diff --git a/.github/workflows/deploy-wiki.yaml b/.github/workflows/deploy-wiki.yaml index e3af3f76c3..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@v5 + - 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 e50a1335b1..da2735c143 100644 --- a/.github/workflows/e2e-master.yaml +++ b/.github/workflows/e2e-master.yaml @@ -15,11 +15,11 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.12.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 diff --git a/.github/workflows/e2e-release-11.0.yaml b/.github/workflows/e2e-release-11.0.yaml index 5389700b2f..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@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.12.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 diff --git a/.github/workflows/e2e-release-12.0.yaml b/.github/workflows/e2e-release-12.0.yaml index b53c542b7f..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@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.12.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 diff --git a/.github/workflows/e2e-release-17.0.yaml b/.github/workflows/e2e-release-17.0.yaml index c582c46859..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@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.12.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 diff --git a/.github/workflows/e2e-release-18.0.yaml b/.github/workflows/e2e-release-18.0.yaml index 773d45dde7..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@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.12.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 diff --git a/.github/workflows/e2e-release-26.0.yaml b/.github/workflows/e2e-release-26.0.yaml index 252960b4f3..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@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Create Kind Cluster - uses: helm/kind-action@v1.12.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 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index aa81496c3c..24ece82472 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,13 +7,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.10", "3.11", "3.12"] + 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@v5 + - uses: actions/checkout@v6 with: submodules: true - name: Set up Python ${{ matrix.python-version }} @@ -44,7 +44,7 @@ jobs: - name: Upload coverage to Codecov if: "matrix.use_coverage" - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: fail_ci_if_error: false verbose: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fe8097078..59f69a4153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,156 @@ +# 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 @@ -434,7 +587,7 @@ consistent with typed JSON metadata decoding, rather than dropping all labels an 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] -- Kubenetes 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 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] diff --git a/README.md b/README.md index 4c95bf30ef..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: @@ -104,6 +104,7 @@ supported versions of Kubernetes clusters. - [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. @@ -172,11 +173,13 @@ between client-python versions. | 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 | ✓ | +| 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. @@ -195,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 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/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.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.certificates_v1beta1_api.rst b/doc/source/kubernetes.client.api.certificates_v1beta1_api.rst deleted file mode 100644 index fe889385f0..0000000000 --- a/doc/source/kubernetes.client.api.certificates_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.certificates\_v1beta1\_api module -======================================================= - -.. automodule:: kubernetes.client.api.certificates_v1beta1_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.coordination_v1alpha2_api.rst b/doc/source/kubernetes.client.api.coordination_v1alpha2_api.rst deleted file mode 100644 index d99991b227..0000000000 --- a/doc/source/kubernetes.client.api.coordination_v1alpha2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.coordination\_v1alpha2\_api module -======================================================== - -.. automodule:: kubernetes.client.api.coordination_v1alpha2_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.coordination_v1beta1_api.rst b/doc/source/kubernetes.client.api.coordination_v1beta1_api.rst deleted file mode 100644 index 76e1ef100f..0000000000 --- a/doc/source/kubernetes.client.api.coordination_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.coordination\_v1beta1\_api module -======================================================= - -.. automodule:: kubernetes.client.api.coordination_v1beta1_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.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_v1beta1_api.rst b/doc/source/kubernetes.client.api.networking_v1beta1_api.rst deleted file mode 100644 index 5e0579d321..0000000000 --- a/doc/source/kubernetes.client.api.networking_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.networking\_v1beta1\_api module -===================================================== - -.. automodule:: kubernetes.client.api.networking_v1beta1_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_v1_api.rst b/doc/source/kubernetes.client.api.resource_v1_api.rst deleted file mode 100644 index 7422edcd4d..0000000000 --- a/doc/source/kubernetes.client.api.resource_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.resource\_v1\_api module -============================================== - -.. automodule:: kubernetes.client.api.resource_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.resource_v1alpha3_api.rst b/doc/source/kubernetes.client.api.resource_v1alpha3_api.rst deleted file mode 100644 index 3a685af948..0000000000 --- a/doc/source/kubernetes.client.api.resource_v1alpha3_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.resource\_v1alpha3\_api module -==================================================== - -.. automodule:: kubernetes.client.api.resource_v1alpha3_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.resource_v1beta1_api.rst b/doc/source/kubernetes.client.api.resource_v1beta1_api.rst deleted file mode 100644 index 55e25585d3..0000000000 --- a/doc/source/kubernetes.client.api.resource_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.resource\_v1beta1\_api module -=================================================== - -.. automodule:: kubernetes.client.api.resource_v1beta1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.api.resource_v1beta2_api.rst b/doc/source/kubernetes.client.api.resource_v1beta2_api.rst deleted file mode 100644 index 094eaa2294..0000000000 --- a/doc/source/kubernetes.client.api.resource_v1beta2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.resource\_v1beta2\_api module -=================================================== - -.. automodule:: kubernetes.client.api.resource_v1beta2_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 3e46d86ff1..0000000000 --- a/doc/source/kubernetes.client.api.rst +++ /dev/null @@ -1,82 +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.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.certificates_v1beta1_api - kubernetes.client.api.coordination_api - kubernetes.client.api.coordination_v1_api - kubernetes.client.api.coordination_v1alpha2_api - kubernetes.client.api.coordination_v1beta1_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.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_v1beta1_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_v1_api - kubernetes.client.api.resource_v1alpha3_api - kubernetes.client.api.resource_v1beta1_api - kubernetes.client.api.resource_v1beta2_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.storage_v1beta1_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.storage_v1beta1_api.rst b/doc/source/kubernetes.client.api.storage_v1beta1_api.rst deleted file mode 100644 index 432a7b0054..0000000000 --- a/doc/source/kubernetes.client.api.storage_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.api.storage\_v1beta1\_api module -================================================== - -.. automodule:: kubernetes.client.api.storage_v1beta1_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.core_v1_resource_claim.rst b/doc/source/kubernetes.client.models.core_v1_resource_claim.rst deleted file mode 100644 index f35763422e..0000000000 --- a/doc/source/kubernetes.client.models.core_v1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.core\_v1\_resource\_claim module -========================================================= - -.. automodule:: kubernetes.client.models.core_v1_resource_claim - :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.resource_v1_resource_claim.rst b/doc/source/kubernetes.client.models.resource_v1_resource_claim.rst deleted file mode 100644 index 797132c161..0000000000 --- a/doc/source/kubernetes.client.models.resource_v1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.resource\_v1\_resource\_claim module -============================================================= - -.. automodule:: kubernetes.client.models.resource_v1_resource_claim - :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 3d621f7724..0000000000 --- a/doc/source/kubernetes.client.models.rst +++ /dev/null @@ -1,734 +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.core_v1_resource_claim - 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.resource_v1_resource_claim - kubernetes.client.models.storage_v1_token_request - kubernetes.client.models.v1_affinity - kubernetes.client.models.v1_aggregation_rule - kubernetes.client.models.v1_allocated_device_status - kubernetes.client.models.v1_allocation_result - 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_capacity_request_policy - kubernetes.client.models.v1_capacity_request_policy_range - kubernetes.client.models.v1_capacity_requirements - kubernetes.client.models.v1_cel_device_selector - 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_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_extended_resource_request - kubernetes.client.models.v1_container_image - kubernetes.client.models.v1_container_port - kubernetes.client.models.v1_container_resize_policy - kubernetes.client.models.v1_container_restart_rule - kubernetes.client.models.v1_container_restart_rule_on_exit_codes - 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_container_user - kubernetes.client.models.v1_controller_revision - kubernetes.client.models.v1_controller_revision_list - kubernetes.client.models.v1_counter - kubernetes.client.models.v1_counter_set - 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_device - kubernetes.client.models.v1_device_allocation_configuration - kubernetes.client.models.v1_device_allocation_result - kubernetes.client.models.v1_device_attribute - kubernetes.client.models.v1_device_capacity - kubernetes.client.models.v1_device_claim - kubernetes.client.models.v1_device_claim_configuration - kubernetes.client.models.v1_device_class - kubernetes.client.models.v1_device_class_configuration - kubernetes.client.models.v1_device_class_list - kubernetes.client.models.v1_device_class_spec - kubernetes.client.models.v1_device_constraint - kubernetes.client.models.v1_device_counter_consumption - kubernetes.client.models.v1_device_request - kubernetes.client.models.v1_device_request_allocation_result - kubernetes.client.models.v1_device_selector - kubernetes.client.models.v1_device_sub_request - kubernetes.client.models.v1_device_taint - kubernetes.client.models.v1_device_toleration - 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_exact_device_request - 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_field_selector_attributes - kubernetes.client.models.v1_field_selector_requirement - kubernetes.client.models.v1_file_key_selector - 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_node - 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_image_volume_source - 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_address - kubernetes.client.models.v1_ip_address_list - kubernetes.client.models.v1_ip_address_spec - 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_attributes - 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_linux_container_user - 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_device_data - 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_features - 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_swap_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_opaque_device_configuration - 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_parent_reference - 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_certificate_projection - 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_extended_resource_claim_status - 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_consumer_reference - kubernetes.client.models.v1_resource_claim_list - kubernetes.client.models.v1_resource_claim_spec - kubernetes.client.models.v1_resource_claim_status - kubernetes.client.models.v1_resource_claim_template - kubernetes.client.models.v1_resource_claim_template_list - kubernetes.client.models.v1_resource_claim_template_spec - kubernetes.client.models.v1_resource_field_selector - kubernetes.client.models.v1_resource_health - kubernetes.client.models.v1_resource_policy_rule - kubernetes.client.models.v1_resource_pool - 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_resource_slice - kubernetes.client.models.v1_resource_slice_list - kubernetes.client.models.v1_resource_slice_spec - kubernetes.client.models.v1_resource_status - 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_cidr - kubernetes.client.models.v1_service_cidr_list - kubernetes.client.models.v1_service_cidr_spec - kubernetes.client.models.v1_service_cidr_status - 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_attributes_class - kubernetes.client.models.v1_volume_attributes_class_list - 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_apply_configuration - 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_group_version_resource - kubernetes.client.models.v1alpha1_json_patch - kubernetes.client.models.v1alpha1_match_condition - kubernetes.client.models.v1alpha1_match_resources - kubernetes.client.models.v1alpha1_migration_condition - kubernetes.client.models.v1alpha1_mutating_admission_policy - kubernetes.client.models.v1alpha1_mutating_admission_policy_binding - kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list - kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec - kubernetes.client.models.v1alpha1_mutating_admission_policy_list - kubernetes.client.models.v1alpha1_mutating_admission_policy_spec - kubernetes.client.models.v1alpha1_mutation - kubernetes.client.models.v1alpha1_named_rule_with_operations - kubernetes.client.models.v1alpha1_param_kind - kubernetes.client.models.v1alpha1_param_ref - kubernetes.client.models.v1alpha1_pod_certificate_request - kubernetes.client.models.v1alpha1_pod_certificate_request_list - kubernetes.client.models.v1alpha1_pod_certificate_request_spec - kubernetes.client.models.v1alpha1_pod_certificate_request_status - kubernetes.client.models.v1alpha1_server_storage_version - 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_variable - kubernetes.client.models.v1alpha1_volume_attributes_class - kubernetes.client.models.v1alpha1_volume_attributes_class_list - kubernetes.client.models.v1alpha2_lease_candidate - kubernetes.client.models.v1alpha2_lease_candidate_list - kubernetes.client.models.v1alpha2_lease_candidate_spec - kubernetes.client.models.v1alpha3_cel_device_selector - kubernetes.client.models.v1alpha3_device_selector - kubernetes.client.models.v1alpha3_device_taint - kubernetes.client.models.v1alpha3_device_taint_rule - kubernetes.client.models.v1alpha3_device_taint_rule_list - kubernetes.client.models.v1alpha3_device_taint_rule_spec - kubernetes.client.models.v1alpha3_device_taint_selector - kubernetes.client.models.v1beta1_allocated_device_status - kubernetes.client.models.v1beta1_allocation_result - kubernetes.client.models.v1beta1_apply_configuration - kubernetes.client.models.v1beta1_basic_device - kubernetes.client.models.v1beta1_capacity_request_policy - kubernetes.client.models.v1beta1_capacity_request_policy_range - kubernetes.client.models.v1beta1_capacity_requirements - kubernetes.client.models.v1beta1_cel_device_selector - kubernetes.client.models.v1beta1_cluster_trust_bundle - kubernetes.client.models.v1beta1_cluster_trust_bundle_list - kubernetes.client.models.v1beta1_cluster_trust_bundle_spec - kubernetes.client.models.v1beta1_counter - kubernetes.client.models.v1beta1_counter_set - kubernetes.client.models.v1beta1_device - kubernetes.client.models.v1beta1_device_allocation_configuration - kubernetes.client.models.v1beta1_device_allocation_result - kubernetes.client.models.v1beta1_device_attribute - kubernetes.client.models.v1beta1_device_capacity - kubernetes.client.models.v1beta1_device_claim - kubernetes.client.models.v1beta1_device_claim_configuration - kubernetes.client.models.v1beta1_device_class - kubernetes.client.models.v1beta1_device_class_configuration - kubernetes.client.models.v1beta1_device_class_list - kubernetes.client.models.v1beta1_device_class_spec - kubernetes.client.models.v1beta1_device_constraint - kubernetes.client.models.v1beta1_device_counter_consumption - kubernetes.client.models.v1beta1_device_request - kubernetes.client.models.v1beta1_device_request_allocation_result - kubernetes.client.models.v1beta1_device_selector - kubernetes.client.models.v1beta1_device_sub_request - kubernetes.client.models.v1beta1_device_taint - kubernetes.client.models.v1beta1_device_toleration - kubernetes.client.models.v1beta1_ip_address - kubernetes.client.models.v1beta1_ip_address_list - kubernetes.client.models.v1beta1_ip_address_spec - kubernetes.client.models.v1beta1_json_patch - kubernetes.client.models.v1beta1_lease_candidate - kubernetes.client.models.v1beta1_lease_candidate_list - kubernetes.client.models.v1beta1_lease_candidate_spec - kubernetes.client.models.v1beta1_match_condition - kubernetes.client.models.v1beta1_match_resources - kubernetes.client.models.v1beta1_mutating_admission_policy - kubernetes.client.models.v1beta1_mutating_admission_policy_binding - kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list - kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec - kubernetes.client.models.v1beta1_mutating_admission_policy_list - kubernetes.client.models.v1beta1_mutating_admission_policy_spec - kubernetes.client.models.v1beta1_mutation - kubernetes.client.models.v1beta1_named_rule_with_operations - kubernetes.client.models.v1beta1_network_device_data - kubernetes.client.models.v1beta1_opaque_device_configuration - kubernetes.client.models.v1beta1_param_kind - kubernetes.client.models.v1beta1_param_ref - kubernetes.client.models.v1beta1_parent_reference - kubernetes.client.models.v1beta1_resource_claim - kubernetes.client.models.v1beta1_resource_claim_consumer_reference - kubernetes.client.models.v1beta1_resource_claim_list - kubernetes.client.models.v1beta1_resource_claim_spec - kubernetes.client.models.v1beta1_resource_claim_status - kubernetes.client.models.v1beta1_resource_claim_template - kubernetes.client.models.v1beta1_resource_claim_template_list - kubernetes.client.models.v1beta1_resource_claim_template_spec - kubernetes.client.models.v1beta1_resource_pool - kubernetes.client.models.v1beta1_resource_slice - kubernetes.client.models.v1beta1_resource_slice_list - kubernetes.client.models.v1beta1_resource_slice_spec - kubernetes.client.models.v1beta1_service_cidr - kubernetes.client.models.v1beta1_service_cidr_list - kubernetes.client.models.v1beta1_service_cidr_spec - kubernetes.client.models.v1beta1_service_cidr_status - kubernetes.client.models.v1beta1_variable - kubernetes.client.models.v1beta1_volume_attributes_class - kubernetes.client.models.v1beta1_volume_attributes_class_list - kubernetes.client.models.v1beta2_allocated_device_status - kubernetes.client.models.v1beta2_allocation_result - kubernetes.client.models.v1beta2_capacity_request_policy - kubernetes.client.models.v1beta2_capacity_request_policy_range - kubernetes.client.models.v1beta2_capacity_requirements - kubernetes.client.models.v1beta2_cel_device_selector - kubernetes.client.models.v1beta2_counter - kubernetes.client.models.v1beta2_counter_set - kubernetes.client.models.v1beta2_device - kubernetes.client.models.v1beta2_device_allocation_configuration - kubernetes.client.models.v1beta2_device_allocation_result - kubernetes.client.models.v1beta2_device_attribute - kubernetes.client.models.v1beta2_device_capacity - kubernetes.client.models.v1beta2_device_claim - kubernetes.client.models.v1beta2_device_claim_configuration - kubernetes.client.models.v1beta2_device_class - kubernetes.client.models.v1beta2_device_class_configuration - kubernetes.client.models.v1beta2_device_class_list - kubernetes.client.models.v1beta2_device_class_spec - kubernetes.client.models.v1beta2_device_constraint - kubernetes.client.models.v1beta2_device_counter_consumption - kubernetes.client.models.v1beta2_device_request - kubernetes.client.models.v1beta2_device_request_allocation_result - kubernetes.client.models.v1beta2_device_selector - kubernetes.client.models.v1beta2_device_sub_request - kubernetes.client.models.v1beta2_device_taint - kubernetes.client.models.v1beta2_device_toleration - kubernetes.client.models.v1beta2_exact_device_request - kubernetes.client.models.v1beta2_network_device_data - kubernetes.client.models.v1beta2_opaque_device_configuration - kubernetes.client.models.v1beta2_resource_claim - kubernetes.client.models.v1beta2_resource_claim_consumer_reference - kubernetes.client.models.v1beta2_resource_claim_list - kubernetes.client.models.v1beta2_resource_claim_spec - kubernetes.client.models.v1beta2_resource_claim_status - kubernetes.client.models.v1beta2_resource_claim_template - kubernetes.client.models.v1beta2_resource_claim_template_list - kubernetes.client.models.v1beta2_resource_claim_template_spec - kubernetes.client.models.v1beta2_resource_pool - kubernetes.client.models.v1beta2_resource_slice - kubernetes.client.models.v1beta2_resource_slice_list - kubernetes.client.models.v1beta2_resource_slice_spec - 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_allocated_device_status.rst b/doc/source/kubernetes.client.models.v1_allocated_device_status.rst deleted file mode 100644 index bbd3e3c7cb..0000000000 --- a/doc/source/kubernetes.client.models.v1_allocated_device_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_allocated\_device\_status module -============================================================= - -.. automodule:: kubernetes.client.models.v1_allocated_device_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_allocation_result.rst b/doc/source/kubernetes.client.models.v1_allocation_result.rst deleted file mode 100644 index e02b22d39d..0000000000 --- a/doc/source/kubernetes.client.models.v1_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_allocation\_result module -====================================================== - -.. automodule:: kubernetes.client.models.v1_allocation_result - :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_capacity_request_policy.rst b/doc/source/kubernetes.client.models.v1_capacity_request_policy.rst deleted file mode 100644 index 38c4d21c85..0000000000 --- a/doc/source/kubernetes.client.models.v1_capacity_request_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_capacity\_request\_policy module -============================================================= - -.. automodule:: kubernetes.client.models.v1_capacity_request_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_capacity_request_policy_range.rst b/doc/source/kubernetes.client.models.v1_capacity_request_policy_range.rst deleted file mode 100644 index 43834d1db6..0000000000 --- a/doc/source/kubernetes.client.models.v1_capacity_request_policy_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_capacity\_request\_policy\_range module -==================================================================== - -.. automodule:: kubernetes.client.models.v1_capacity_request_policy_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_capacity_requirements.rst b/doc/source/kubernetes.client.models.v1_capacity_requirements.rst deleted file mode 100644 index 91a315c0b3..0000000000 --- a/doc/source/kubernetes.client.models.v1_capacity_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_capacity\_requirements module -========================================================== - -.. automodule:: kubernetes.client.models.v1_capacity_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_cel_device_selector.rst b/doc/source/kubernetes.client.models.v1_cel_device_selector.rst deleted file mode 100644 index 0ded989a02..0000000000 --- a/doc/source/kubernetes.client.models.v1_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_cel\_device\_selector module -========================================================= - -.. automodule:: kubernetes.client.models.v1_cel_device_selector - :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_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_extended_resource_request.rst b/doc/source/kubernetes.client.models.v1_container_extended_resource_request.rst deleted file mode 100644 index 612abfd144..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_extended_resource_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_extended\_resource\_request module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_container_extended_resource_request - :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_restart_rule.rst b/doc/source/kubernetes.client.models.v1_container_restart_rule.rst deleted file mode 100644 index 92a209914e..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_restart_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_restart\_rule module -============================================================ - -.. automodule:: kubernetes.client.models.v1_container_restart_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_container_restart_rule_on_exit_codes.rst b/doc/source/kubernetes.client.models.v1_container_restart_rule_on_exit_codes.rst deleted file mode 100644 index 155ec50427..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_restart_rule_on_exit_codes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_restart\_rule\_on\_exit\_codes module -============================================================================= - -.. automodule:: kubernetes.client.models.v1_container_restart_rule_on_exit_codes - :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_container_user.rst b/doc/source/kubernetes.client.models.v1_container_user.rst deleted file mode 100644 index a4ecd2aa32..0000000000 --- a/doc/source/kubernetes.client.models.v1_container_user.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_container\_user module -=================================================== - -.. automodule:: kubernetes.client.models.v1_container_user - :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_counter.rst b/doc/source/kubernetes.client.models.v1_counter.rst deleted file mode 100644 index 80c791fddf..0000000000 --- a/doc/source/kubernetes.client.models.v1_counter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_counter module -=========================================== - -.. automodule:: kubernetes.client.models.v1_counter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_counter_set.rst b/doc/source/kubernetes.client.models.v1_counter_set.rst deleted file mode 100644 index 4f0ecf9e48..0000000000 --- a/doc/source/kubernetes.client.models.v1_counter_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_counter\_set module -================================================ - -.. automodule:: kubernetes.client.models.v1_counter_set - :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_device.rst b/doc/source/kubernetes.client.models.v1_device.rst deleted file mode 100644 index c76aeccb35..0000000000 --- a/doc/source/kubernetes.client.models.v1_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device module -========================================== - -.. automodule:: kubernetes.client.models.v1_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_allocation_configuration.rst b/doc/source/kubernetes.client.models.v1_device_allocation_configuration.rst deleted file mode 100644 index cbe4acc7f3..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_allocation_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_allocation\_configuration module -===================================================================== - -.. automodule:: kubernetes.client.models.v1_device_allocation_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_allocation_result.rst b/doc/source/kubernetes.client.models.v1_device_allocation_result.rst deleted file mode 100644 index c1abe801d8..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_allocation\_result module -============================================================== - -.. automodule:: kubernetes.client.models.v1_device_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_attribute.rst b/doc/source/kubernetes.client.models.v1_device_attribute.rst deleted file mode 100644 index 7d4830bcb8..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_attribute module -===================================================== - -.. automodule:: kubernetes.client.models.v1_device_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_capacity.rst b/doc/source/kubernetes.client.models.v1_device_capacity.rst deleted file mode 100644 index e810240460..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_capacity module -==================================================== - -.. automodule:: kubernetes.client.models.v1_device_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_claim.rst b/doc/source/kubernetes.client.models.v1_device_claim.rst deleted file mode 100644 index 634b95ca0e..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_claim module -================================================= - -.. automodule:: kubernetes.client.models.v1_device_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_claim_configuration.rst b/doc/source/kubernetes.client.models.v1_device_claim_configuration.rst deleted file mode 100644 index 0ae7460cd7..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_claim_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_claim\_configuration module -================================================================ - -.. automodule:: kubernetes.client.models.v1_device_claim_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_class.rst b/doc/source/kubernetes.client.models.v1_device_class.rst deleted file mode 100644 index da918de572..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_class module -================================================= - -.. automodule:: kubernetes.client.models.v1_device_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_class_configuration.rst b/doc/source/kubernetes.client.models.v1_device_class_configuration.rst deleted file mode 100644 index 7819b53480..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_class_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_class\_configuration module -================================================================ - -.. automodule:: kubernetes.client.models.v1_device_class_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_class_list.rst b/doc/source/kubernetes.client.models.v1_device_class_list.rst deleted file mode 100644 index a351c9f15d..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_class\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_device_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_class_spec.rst b/doc/source/kubernetes.client.models.v1_device_class_spec.rst deleted file mode 100644 index f83370b57f..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_class\_spec module -======================================================= - -.. automodule:: kubernetes.client.models.v1_device_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_constraint.rst b/doc/source/kubernetes.client.models.v1_device_constraint.rst deleted file mode 100644 index 800d8d2d40..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_constraint module -====================================================== - -.. automodule:: kubernetes.client.models.v1_device_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_counter_consumption.rst b/doc/source/kubernetes.client.models.v1_device_counter_consumption.rst deleted file mode 100644 index c20b757281..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_counter_consumption.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_counter\_consumption module -================================================================ - -.. automodule:: kubernetes.client.models.v1_device_counter_consumption - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_request.rst b/doc/source/kubernetes.client.models.v1_device_request.rst deleted file mode 100644 index 71e53f52ea..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_request module -=================================================== - -.. automodule:: kubernetes.client.models.v1_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_request_allocation_result.rst b/doc/source/kubernetes.client.models.v1_device_request_allocation_result.rst deleted file mode 100644 index 37ef200535..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_request_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_request\_allocation\_result module -======================================================================= - -.. automodule:: kubernetes.client.models.v1_device_request_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_selector.rst b/doc/source/kubernetes.client.models.v1_device_selector.rst deleted file mode 100644 index c807c77be1..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_selector module -==================================================== - -.. automodule:: kubernetes.client.models.v1_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_sub_request.rst b/doc/source/kubernetes.client.models.v1_device_sub_request.rst deleted file mode 100644 index 9b2ea6de63..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_sub_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_sub\_request module -======================================================== - -.. automodule:: kubernetes.client.models.v1_device_sub_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_taint.rst b/doc/source/kubernetes.client.models.v1_device_taint.rst deleted file mode 100644 index 4faafa0cf2..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_taint module -================================================= - -.. automodule:: kubernetes.client.models.v1_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_device_toleration.rst b/doc/source/kubernetes.client.models.v1_device_toleration.rst deleted file mode 100644 index bce90ed089..0000000000 --- a/doc/source/kubernetes.client.models.v1_device_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_device\_toleration module -====================================================== - -.. automodule:: kubernetes.client.models.v1_device_toleration - :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_exact_device_request.rst b/doc/source/kubernetes.client.models.v1_exact_device_request.rst deleted file mode 100644 index 9cc0d9740c..0000000000 --- a/doc/source/kubernetes.client.models.v1_exact_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_exact\_device\_request module -========================================================== - -.. automodule:: kubernetes.client.models.v1_exact_device_request - :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_field_selector_attributes.rst b/doc/source/kubernetes.client.models.v1_field_selector_attributes.rst deleted file mode 100644 index d7940a0b33..0000000000 --- a/doc/source/kubernetes.client.models.v1_field_selector_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_field\_selector\_attributes module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_field_selector_attributes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_field_selector_requirement.rst b/doc/source/kubernetes.client.models.v1_field_selector_requirement.rst deleted file mode 100644 index fb5cf586fe..0000000000 --- a/doc/source/kubernetes.client.models.v1_field_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_field\_selector\_requirement module -================================================================ - -.. automodule:: kubernetes.client.models.v1_field_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_file_key_selector.rst b/doc/source/kubernetes.client.models.v1_file_key_selector.rst deleted file mode 100644 index 9e1a22e1b5..0000000000 --- a/doc/source/kubernetes.client.models.v1_file_key_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_file\_key\_selector module -======================================================= - -.. automodule:: kubernetes.client.models.v1_file_key_selector - :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_node.rst b/doc/source/kubernetes.client.models.v1_for_node.rst deleted file mode 100644 index 45c79ffe7f..0000000000 --- a/doc/source/kubernetes.client.models.v1_for_node.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_for\_node module -============================================= - -.. automodule:: kubernetes.client.models.v1_for_node - :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_image_volume_source.rst b/doc/source/kubernetes.client.models.v1_image_volume_source.rst deleted file mode 100644 index a6b905344d..0000000000 --- a/doc/source/kubernetes.client.models.v1_image_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_image\_volume\_source module -========================================================= - -.. automodule:: kubernetes.client.models.v1_image_volume_source - :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_address.rst b/doc/source/kubernetes.client.models.v1_ip_address.rst deleted file mode 100644 index 88d13f16b8..0000000000 --- a/doc/source/kubernetes.client.models.v1_ip_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ip\_address module -=============================================== - -.. automodule:: kubernetes.client.models.v1_ip_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ip_address_list.rst b/doc/source/kubernetes.client.models.v1_ip_address_list.rst deleted file mode 100644 index 82696f5ea0..0000000000 --- a/doc/source/kubernetes.client.models.v1_ip_address_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ip\_address\_list module -===================================================== - -.. automodule:: kubernetes.client.models.v1_ip_address_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_ip_address_spec.rst b/doc/source/kubernetes.client.models.v1_ip_address_spec.rst deleted file mode 100644 index bba8fceb5c..0000000000 --- a/doc/source/kubernetes.client.models.v1_ip_address_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_ip\_address\_spec module -===================================================== - -.. automodule:: kubernetes.client.models.v1_ip_address_spec - :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_attributes.rst b/doc/source/kubernetes.client.models.v1_label_selector_attributes.rst deleted file mode 100644 index bbf24e1f81..0000000000 --- a/doc/source/kubernetes.client.models.v1_label_selector_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_label\_selector\_attributes module -=============================================================== - -.. automodule:: kubernetes.client.models.v1_label_selector_attributes - :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_linux_container_user.rst b/doc/source/kubernetes.client.models.v1_linux_container_user.rst deleted file mode 100644 index 87dfdeda95..0000000000 --- a/doc/source/kubernetes.client.models.v1_linux_container_user.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_linux\_container\_user module -========================================================== - -.. automodule:: kubernetes.client.models.v1_linux_container_user - :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_device_data.rst b/doc/source/kubernetes.client.models.v1_network_device_data.rst deleted file mode 100644 index 31b5bec7e3..0000000000 --- a/doc/source/kubernetes.client.models.v1_network_device_data.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_network\_device\_data module -========================================================= - -.. automodule:: kubernetes.client.models.v1_network_device_data - :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_features.rst b/doc/source/kubernetes.client.models.v1_node_features.rst deleted file mode 100644 index f8a3a09693..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_features.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_features module -================================================== - -.. automodule:: kubernetes.client.models.v1_node_features - :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_swap_status.rst b/doc/source/kubernetes.client.models.v1_node_swap_status.rst deleted file mode 100644 index 2ab02222c7..0000000000 --- a/doc/source/kubernetes.client.models.v1_node_swap_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_node\_swap\_status module -====================================================== - -.. automodule:: kubernetes.client.models.v1_node_swap_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_opaque_device_configuration.rst b/doc/source/kubernetes.client.models.v1_opaque_device_configuration.rst deleted file mode 100644 index a482ab5f1c..0000000000 --- a/doc/source/kubernetes.client.models.v1_opaque_device_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_opaque\_device\_configuration module -================================================================= - -.. automodule:: kubernetes.client.models.v1_opaque_device_configuration - :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_parent_reference.rst b/doc/source/kubernetes.client.models.v1_parent_reference.rst deleted file mode 100644 index 9c543fb1a8..0000000000 --- a/doc/source/kubernetes.client.models.v1_parent_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_parent\_reference module -===================================================== - -.. automodule:: kubernetes.client.models.v1_parent_reference - :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_certificate_projection.rst b/doc/source/kubernetes.client.models.v1_pod_certificate_projection.rst deleted file mode 100644 index 34afaba585..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_certificate_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_certificate\_projection module -================================================================ - -.. automodule:: kubernetes.client.models.v1_pod_certificate_projection - :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_extended_resource_claim_status.rst b/doc/source/kubernetes.client.models.v1_pod_extended_resource_claim_status.rst deleted file mode 100644 index 1fa40231e9..0000000000 --- a/doc/source/kubernetes.client.models.v1_pod_extended_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_pod\_extended\_resource\_claim\_status module -========================================================================== - -.. automodule:: kubernetes.client.models.v1_pod_extended_resource_claim_status - :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_consumer_reference.rst b/doc/source/kubernetes.client.models.v1_resource_claim_consumer_reference.rst deleted file mode 100644 index 8dddd7fbcf..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_consumer\_reference module -======================================================================== - -.. automodule:: kubernetes.client.models.v1_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim_list.rst b/doc/source/kubernetes.client.models.v1_resource_claim_list.rst deleted file mode 100644 index 8d95651a44..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_list module -========================================================= - -.. automodule:: kubernetes.client.models.v1_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim_spec.rst b/doc/source/kubernetes.client.models.v1_resource_claim_spec.rst deleted file mode 100644 index 063a31fab1..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_spec module -========================================================= - -.. automodule:: kubernetes.client.models.v1_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim_status.rst b/doc/source/kubernetes.client.models.v1_resource_claim_status.rst deleted file mode 100644 index a158cd04b4..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_status module -=========================================================== - -.. automodule:: kubernetes.client.models.v1_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim_template.rst b/doc/source/kubernetes.client.models.v1_resource_claim_template.rst deleted file mode 100644 index bdddbdb9f6..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_template module -============================================================= - -.. automodule:: kubernetes.client.models.v1_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim_template_list.rst b/doc/source/kubernetes.client.models.v1_resource_claim_template_list.rst deleted file mode 100644 index 6c65ced75d..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_template\_list module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_claim_template_spec.rst b/doc/source/kubernetes.client.models.v1_resource_claim_template_spec.rst deleted file mode 100644 index afeb30c22a..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_claim\_template\_spec module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_resource_claim_template_spec - :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_health.rst b/doc/source/kubernetes.client.models.v1_resource_health.rst deleted file mode 100644 index 29e6b3f6d4..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_health.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_health module -==================================================== - -.. automodule:: kubernetes.client.models.v1_resource_health - :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_pool.rst b/doc/source/kubernetes.client.models.v1_resource_pool.rst deleted file mode 100644 index 447c977976..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_pool.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_pool module -================================================== - -.. automodule:: kubernetes.client.models.v1_resource_pool - :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_resource_slice.rst b/doc/source/kubernetes.client.models.v1_resource_slice.rst deleted file mode 100644 index cc87219390..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_slice module -=================================================== - -.. automodule:: kubernetes.client.models.v1_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_slice_list.rst b/doc/source/kubernetes.client.models.v1_resource_slice_list.rst deleted file mode 100644 index 18d437e5aa..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_slice\_list module -========================================================= - -.. automodule:: kubernetes.client.models.v1_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_slice_spec.rst b/doc/source/kubernetes.client.models.v1_resource_slice_spec.rst deleted file mode 100644 index 42087257b0..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_slice_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_slice\_spec module -========================================================= - -.. automodule:: kubernetes.client.models.v1_resource_slice_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_resource_status.rst b/doc/source/kubernetes.client.models.v1_resource_status.rst deleted file mode 100644 index 3179eca915..0000000000 --- a/doc/source/kubernetes.client.models.v1_resource_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_resource\_status module -==================================================== - -.. automodule:: kubernetes.client.models.v1_resource_status - :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_cidr.rst b/doc/source/kubernetes.client.models.v1_service_cidr.rst deleted file mode 100644 index afacb7a556..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_cidr module -================================================= - -.. automodule:: kubernetes.client.models.v1_service_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_cidr_list.rst b/doc/source/kubernetes.client.models.v1_service_cidr_list.rst deleted file mode 100644 index 1226211a3a..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_cidr_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_cidr\_list module -======================================================= - -.. automodule:: kubernetes.client.models.v1_service_cidr_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_cidr_spec.rst b/doc/source/kubernetes.client.models.v1_service_cidr_spec.rst deleted file mode 100644 index 936360e2da..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_cidr_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_cidr\_spec module -======================================================= - -.. automodule:: kubernetes.client.models.v1_service_cidr_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_service_cidr_status.rst b/doc/source/kubernetes.client.models.v1_service_cidr_status.rst deleted file mode 100644 index 1ecc9ecaa0..0000000000 --- a/doc/source/kubernetes.client.models.v1_service_cidr_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_service\_cidr\_status module -========================================================= - -.. automodule:: kubernetes.client.models.v1_service_cidr_status - :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_attributes_class.rst b/doc/source/kubernetes.client.models.v1_volume_attributes_class.rst deleted file mode 100644 index 3e92f221e6..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attributes_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attributes\_class module -============================================================= - -.. automodule:: kubernetes.client.models.v1_volume_attributes_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1_volume_attributes_class_list.rst b/doc/source/kubernetes.client.models.v1_volume_attributes_class_list.rst deleted file mode 100644 index d7eed7386b..0000000000 --- a/doc/source/kubernetes.client.models.v1_volume_attributes_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1\_volume\_attributes\_class\_list module -=================================================================== - -.. automodule:: kubernetes.client.models.v1_volume_attributes_class_list - :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_apply_configuration.rst b/doc/source/kubernetes.client.models.v1alpha1_apply_configuration.rst deleted file mode 100644 index 6a0149e2e5..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_apply_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_apply\_configuration module -============================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_apply_configuration - :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_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_json_patch.rst b/doc/source/kubernetes.client.models.v1alpha1_json_patch.rst deleted file mode 100644 index d27e38250a..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_json_patch.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_json\_patch module -===================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_json_patch - :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_mutating_admission_policy.rst b/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy.rst deleted file mode 100644 index 569e670a35..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutating\_admission\_policy module -===================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding.rst b/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding.rst deleted file mode 100644 index fcedab49fc..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutating\_admission\_policy\_binding module -============================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list.rst b/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list.rst deleted file mode 100644 index 1273390c13..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutating\_admission\_policy\_binding\_list module -==================================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec.rst deleted file mode 100644 index 99dd13d7c7..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutating\_admission\_policy\_binding\_spec module -==================================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_list.rst b/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_list.rst deleted file mode 100644 index 20aa41818f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutating\_admission\_policy\_list module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_spec.rst deleted file mode 100644 index 69d84ec5c8..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutating\_admission\_policy\_spec module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_mutation.rst b/doc/source/kubernetes.client.models.v1alpha1_mutation.rst deleted file mode 100644 index 066f0e395f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_mutation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_mutation module -================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_mutation - :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_pod_certificate_request.rst b/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request.rst deleted file mode 100644 index 26dded5839..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_pod\_certificate\_request module -=================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_pod_certificate_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_list.rst b/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_list.rst deleted file mode 100644 index 0a34ed21c0..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_pod\_certificate\_request\_list module -========================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_pod_certificate_request_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_spec.rst b/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_spec.rst deleted file mode 100644 index 82ccebb71f..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_pod\_certificate\_request\_spec module -========================================================================= - -.. automodule:: kubernetes.client.models.v1alpha1_pod_certificate_request_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_status.rst b/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_status.rst deleted file mode 100644 index 697cd9d773..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha1_pod_certificate_request_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha1\_pod\_certificate\_request\_status module -=========================================================================== - -.. automodule:: kubernetes.client.models.v1alpha1_pod_certificate_request_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_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_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_lease_candidate.rst b/doc/source/kubernetes.client.models.v1alpha2_lease_candidate.rst deleted file mode 100644 index 5fa57990f4..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_lease_candidate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_lease\_candidate module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha2_lease_candidate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_lease_candidate_list.rst b/doc/source/kubernetes.client.models.v1alpha2_lease_candidate_list.rst deleted file mode 100644 index cd0af37384..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_lease_candidate_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_lease\_candidate\_list module -================================================================ - -.. automodule:: kubernetes.client.models.v1alpha2_lease_candidate_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha2_lease_candidate_spec.rst b/doc/source/kubernetes.client.models.v1alpha2_lease_candidate_spec.rst deleted file mode 100644 index 7462fa6c18..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha2_lease_candidate_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha2\_lease\_candidate\_spec module -================================================================ - -.. automodule:: kubernetes.client.models.v1alpha2_lease_candidate_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_cel_device_selector.rst b/doc/source/kubernetes.client.models.v1alpha3_cel_device_selector.rst deleted file mode 100644 index 5b2bdc6363..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_cel\_device\_selector module -=============================================================== - -.. automodule:: kubernetes.client.models.v1alpha3_cel_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_device_selector.rst b/doc/source/kubernetes.client.models.v1alpha3_device_selector.rst deleted file mode 100644 index 0bb5f3160d..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_device\_selector module -========================================================== - -.. automodule:: kubernetes.client.models.v1alpha3_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_device_taint.rst b/doc/source/kubernetes.client.models.v1alpha3_device_taint.rst deleted file mode 100644 index d31f3fd303..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_device\_taint module -======================================================= - -.. automodule:: kubernetes.client.models.v1alpha3_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule.rst b/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule.rst deleted file mode 100644 index 254a051caa..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_device\_taint\_rule module -============================================================= - -.. automodule:: kubernetes.client.models.v1alpha3_device_taint_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule_list.rst b/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule_list.rst deleted file mode 100644 index 1f6d53f119..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_device\_taint\_rule\_list module -=================================================================== - -.. automodule:: kubernetes.client.models.v1alpha3_device_taint_rule_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule_spec.rst b/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule_spec.rst deleted file mode 100644 index 9710b4b5e0..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_device_taint_rule_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_device\_taint\_rule\_spec module -=================================================================== - -.. automodule:: kubernetes.client.models.v1alpha3_device_taint_rule_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1alpha3_device_taint_selector.rst b/doc/source/kubernetes.client.models.v1alpha3_device_taint_selector.rst deleted file mode 100644 index dac891e6bc..0000000000 --- a/doc/source/kubernetes.client.models.v1alpha3_device_taint_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1alpha3\_device\_taint\_selector module -================================================================= - -.. automodule:: kubernetes.client.models.v1alpha3_device_taint_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_allocated_device_status.rst b/doc/source/kubernetes.client.models.v1beta1_allocated_device_status.rst deleted file mode 100644 index e49b082369..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_allocated_device_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_allocated\_device\_status module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_allocated_device_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_allocation_result.rst b/doc/source/kubernetes.client.models.v1beta1_allocation_result.rst deleted file mode 100644 index 5caec277ac..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_allocation\_result module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_apply_configuration.rst b/doc/source/kubernetes.client.models.v1beta1_apply_configuration.rst deleted file mode 100644 index 30a8f07201..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_apply_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_apply\_configuration module -============================================================= - -.. automodule:: kubernetes.client.models.v1beta1_apply_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_basic_device.rst b/doc/source/kubernetes.client.models.v1beta1_basic_device.rst deleted file mode 100644 index 0e09c4afbe..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_basic_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_basic\_device module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta1_basic_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_capacity_request_policy.rst b/doc/source/kubernetes.client.models.v1beta1_capacity_request_policy.rst deleted file mode 100644 index 65a551746e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_capacity_request_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_capacity\_request\_policy module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_capacity_request_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_capacity_request_policy_range.rst b/doc/source/kubernetes.client.models.v1beta1_capacity_request_policy_range.rst deleted file mode 100644 index 4977fb0086..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_capacity_request_policy_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_capacity\_request\_policy\_range module -========================================================================= - -.. automodule:: kubernetes.client.models.v1beta1_capacity_request_policy_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_capacity_requirements.rst b/doc/source/kubernetes.client.models.v1beta1_capacity_requirements.rst deleted file mode 100644 index 57b1446ee0..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_capacity_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_capacity\_requirements module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_capacity_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_cel_device_selector.rst b/doc/source/kubernetes.client.models.v1beta1_cel_device_selector.rst deleted file mode 100644 index 7a18c5ec04..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_cel\_device\_selector module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_cel_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle.rst b/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle.rst deleted file mode 100644 index ac30e51b60..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_cluster\_trust\_bundle module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_cluster_trust_bundle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle_list.rst b/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle_list.rst deleted file mode 100644 index 4ade2b29d5..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_cluster\_trust\_bundle\_list module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_cluster_trust_bundle_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle_spec.rst b/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle_spec.rst deleted file mode 100644 index a46c40832c..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_cluster_trust_bundle_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_cluster\_trust\_bundle\_spec module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_cluster_trust_bundle_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_counter.rst b/doc/source/kubernetes.client.models.v1beta1_counter.rst deleted file mode 100644 index 32d88ac2bc..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_counter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_counter module -================================================ - -.. automodule:: kubernetes.client.models.v1beta1_counter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_counter_set.rst b/doc/source/kubernetes.client.models.v1beta1_counter_set.rst deleted file mode 100644 index 4026701440..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_counter_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_counter\_set module -===================================================== - -.. automodule:: kubernetes.client.models.v1beta1_counter_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device.rst b/doc/source/kubernetes.client.models.v1beta1_device.rst deleted file mode 100644 index e776d4e610..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device module -=============================================== - -.. automodule:: kubernetes.client.models.v1beta1_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_allocation_configuration.rst b/doc/source/kubernetes.client.models.v1beta1_device_allocation_configuration.rst deleted file mode 100644 index a1494ec028..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_allocation_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_allocation\_configuration module -========================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_allocation_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_allocation_result.rst b/doc/source/kubernetes.client.models.v1beta1_device_allocation_result.rst deleted file mode 100644 index 069e329129..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_allocation\_result module -=================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_attribute.rst b/doc/source/kubernetes.client.models.v1beta1_device_attribute.rst deleted file mode 100644 index b10b33e537..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_attribute module -========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_capacity.rst b/doc/source/kubernetes.client.models.v1beta1_device_capacity.rst deleted file mode 100644 index 989891d30f..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_capacity module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta1_device_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_claim.rst b/doc/source/kubernetes.client.models.v1beta1_device_claim.rst deleted file mode 100644 index 9d09eff0c2..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_claim module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_claim_configuration.rst b/doc/source/kubernetes.client.models.v1beta1_device_claim_configuration.rst deleted file mode 100644 index 9fdac4fd9a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_claim_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_claim\_configuration module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_claim_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_class.rst b/doc/source/kubernetes.client.models.v1beta1_device_class.rst deleted file mode 100644 index cb301b1ef7..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_class module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_class_configuration.rst b/doc/source/kubernetes.client.models.v1beta1_device_class_configuration.rst deleted file mode 100644 index c3df3fec0e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_class_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_class\_configuration module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_class_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_class_list.rst b/doc/source/kubernetes.client.models.v1beta1_device_class_list.rst deleted file mode 100644 index 30efdeccf7..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_class\_list module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta1_device_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_class_spec.rst b/doc/source/kubernetes.client.models.v1beta1_device_class_spec.rst deleted file mode 100644 index 2ef553dbff..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_class\_spec module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta1_device_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_constraint.rst b/doc/source/kubernetes.client.models.v1beta1_device_constraint.rst deleted file mode 100644 index 1d01ee5f09..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_constraint module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_counter_consumption.rst b/doc/source/kubernetes.client.models.v1beta1_device_counter_consumption.rst deleted file mode 100644 index 333ffc3e60..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_counter_consumption.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_counter\_consumption module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_counter_consumption - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_request.rst b/doc/source/kubernetes.client.models.v1beta1_device_request.rst deleted file mode 100644 index 511467f8ef..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_request module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_request_allocation_result.rst b/doc/source/kubernetes.client.models.v1beta1_device_request_allocation_result.rst deleted file mode 100644 index 532295ed09..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_request_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_request\_allocation\_result module -============================================================================ - -.. automodule:: kubernetes.client.models.v1beta1_device_request_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_selector.rst b/doc/source/kubernetes.client.models.v1beta1_device_selector.rst deleted file mode 100644 index 9cac2e2a0c..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_selector module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta1_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_sub_request.rst b/doc/source/kubernetes.client.models.v1beta1_device_sub_request.rst deleted file mode 100644 index f40ccaecbe..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_sub_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_sub\_request module -============================================================= - -.. automodule:: kubernetes.client.models.v1beta1_device_sub_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_taint.rst b/doc/source/kubernetes.client.models.v1beta1_device_taint.rst deleted file mode 100644 index e90f2e5c20..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_taint module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_device_toleration.rst b/doc/source/kubernetes.client.models.v1beta1_device_toleration.rst deleted file mode 100644 index e66c5f0d37..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_device_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_device\_toleration module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_device_toleration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_ip_address.rst b/doc/source/kubernetes.client.models.v1beta1_ip_address.rst deleted file mode 100644 index 37a11892a1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_ip_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_ip\_address module -==================================================== - -.. automodule:: kubernetes.client.models.v1beta1_ip_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_ip_address_list.rst b/doc/source/kubernetes.client.models.v1beta1_ip_address_list.rst deleted file mode 100644 index 344ce00dcc..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_ip_address_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_ip\_address\_list module -========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_ip_address_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_ip_address_spec.rst b/doc/source/kubernetes.client.models.v1beta1_ip_address_spec.rst deleted file mode 100644 index 2b690b0f1e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_ip_address_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_ip\_address\_spec module -========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_ip_address_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_json_patch.rst b/doc/source/kubernetes.client.models.v1beta1_json_patch.rst deleted file mode 100644 index fa5f2e4265..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_json_patch.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_json\_patch module -==================================================== - -.. automodule:: kubernetes.client.models.v1beta1_json_patch - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_lease_candidate.rst b/doc/source/kubernetes.client.models.v1beta1_lease_candidate.rst deleted file mode 100644 index 2037be721e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_lease_candidate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_lease\_candidate module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta1_lease_candidate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_lease_candidate_list.rst b/doc/source/kubernetes.client.models.v1beta1_lease_candidate_list.rst deleted file mode 100644 index 1ceaf294d4..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_lease_candidate_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_lease\_candidate\_list module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_lease_candidate_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_lease_candidate_spec.rst b/doc/source/kubernetes.client.models.v1beta1_lease_candidate_spec.rst deleted file mode 100644 index 6987e61dbb..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_lease_candidate_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_lease\_candidate\_spec module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_lease_candidate_spec - :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_mutating_admission_policy.rst b/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy.rst deleted file mode 100644 index 2b676604dd..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutating\_admission\_policy module -==================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_mutating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding.rst b/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding.rst deleted file mode 100644 index e8c9a51b2a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutating\_admission\_policy\_binding module -============================================================================= - -.. automodule:: kubernetes.client.models.v1beta1_mutating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list.rst b/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list.rst deleted file mode 100644 index 022bed1342..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutating\_admission\_policy\_binding\_list module -=================================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_mutating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec.rst b/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec.rst deleted file mode 100644 index 76a88228bb..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutating\_admission\_policy\_binding\_spec module -=================================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_mutating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_list.rst b/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_list.rst deleted file mode 100644 index 95c7d00dbe..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutating\_admission\_policy\_list module -========================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_mutating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_spec.rst b/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_spec.rst deleted file mode 100644 index 592808ae73..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutating\_admission\_policy\_spec module -========================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_mutating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_mutation.rst b/doc/source/kubernetes.client.models.v1beta1_mutation.rst deleted file mode 100644 index 62fc33d8a2..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_mutation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_mutation module -================================================= - -.. automodule:: kubernetes.client.models.v1beta1_mutation - :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_network_device_data.rst b/doc/source/kubernetes.client.models.v1beta1_network_device_data.rst deleted file mode 100644 index 709103a2c4..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_network_device_data.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_network\_device\_data module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_network_device_data - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_opaque_device_configuration.rst b/doc/source/kubernetes.client.models.v1beta1_opaque_device_configuration.rst deleted file mode 100644 index e7ca1f52af..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_opaque_device_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_opaque\_device\_configuration module -====================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_opaque_device_configuration - :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_parent_reference.rst b/doc/source/kubernetes.client.models.v1beta1_parent_reference.rst deleted file mode 100644 index 13b67edfd6..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_parent_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_parent\_reference module -========================================================== - -.. automodule:: kubernetes.client.models.v1beta1_parent_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim.rst deleted file mode 100644 index df20224e23..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_consumer_reference.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_consumer_reference.rst deleted file mode 100644 index a107dbfc9b..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_consumer\_reference module -============================================================================= - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_list.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_list.rst deleted file mode 100644 index ec6a5852d1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_list module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_spec.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_spec.rst deleted file mode 100644 index b5495347b3..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_spec module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_status.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_status.rst deleted file mode 100644 index 77eef9c1e1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_status module -================================================================ - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_template.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_template.rst deleted file mode 100644 index f2c40b5f05..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_template module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_template_list.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_template_list.rst deleted file mode 100644 index b62d2c067e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_template\_list module -======================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_claim_template_spec.rst b/doc/source/kubernetes.client.models.v1beta1_resource_claim_template_spec.rst deleted file mode 100644 index 97bb2027ab..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_claim\_template\_spec module -======================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_claim_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_pool.rst b/doc/source/kubernetes.client.models.v1beta1_resource_pool.rst deleted file mode 100644 index 355b492daa..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_pool.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_pool module -======================================================= - -.. automodule:: kubernetes.client.models.v1beta1_resource_pool - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_slice.rst b/doc/source/kubernetes.client.models.v1beta1_resource_slice.rst deleted file mode 100644 index 3eba95d57e..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_slice module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_slice_list.rst b/doc/source/kubernetes.client.models.v1beta1_resource_slice_list.rst deleted file mode 100644 index 9cce7e467c..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_slice\_list module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_resource_slice_spec.rst b/doc/source/kubernetes.client.models.v1beta1_resource_slice_spec.rst deleted file mode 100644 index 66dd92351a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_resource_slice_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_resource\_slice\_spec module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_resource_slice_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_service_cidr.rst b/doc/source/kubernetes.client.models.v1beta1_service_cidr.rst deleted file mode 100644 index caf1603597..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_service_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_service\_cidr module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta1_service_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_service_cidr_list.rst b/doc/source/kubernetes.client.models.v1beta1_service_cidr_list.rst deleted file mode 100644 index 18980eda65..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_service_cidr_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_service\_cidr\_list module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta1_service_cidr_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_service_cidr_spec.rst b/doc/source/kubernetes.client.models.v1beta1_service_cidr_spec.rst deleted file mode 100644 index 5161de79e6..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_service_cidr_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_service\_cidr\_spec module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta1_service_cidr_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_service_cidr_status.rst b/doc/source/kubernetes.client.models.v1beta1_service_cidr_status.rst deleted file mode 100644 index 8c19460dda..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_service_cidr_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_service\_cidr\_status module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta1_service_cidr_status - :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.v1beta1_volume_attributes_class.rst b/doc/source/kubernetes.client.models.v1beta1_volume_attributes_class.rst deleted file mode 100644 index 883c67b124..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_volume_attributes_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_volume\_attributes\_class module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_volume_attributes_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta1_volume_attributes_class_list.rst b/doc/source/kubernetes.client.models.v1beta1_volume_attributes_class_list.rst deleted file mode 100644 index 1f2cc54203..0000000000 --- a/doc/source/kubernetes.client.models.v1beta1_volume_attributes_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta1\_volume\_attributes\_class\_list module -======================================================================== - -.. automodule:: kubernetes.client.models.v1beta1_volume_attributes_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_allocated_device_status.rst b/doc/source/kubernetes.client.models.v1beta2_allocated_device_status.rst deleted file mode 100644 index 4a793abf87..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_allocated_device_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_allocated\_device\_status module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_allocated_device_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_allocation_result.rst b/doc/source/kubernetes.client.models.v1beta2_allocation_result.rst deleted file mode 100644 index 7921ad3fbb..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_allocation\_result module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta2_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_capacity_request_policy.rst b/doc/source/kubernetes.client.models.v1beta2_capacity_request_policy.rst deleted file mode 100644 index 6e0867bd0d..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_capacity_request_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_capacity\_request\_policy module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_capacity_request_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_capacity_request_policy_range.rst b/doc/source/kubernetes.client.models.v1beta2_capacity_request_policy_range.rst deleted file mode 100644 index c9a9c49a55..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_capacity_request_policy_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_capacity\_request\_policy\_range module -========================================================================= - -.. automodule:: kubernetes.client.models.v1beta2_capacity_request_policy_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_capacity_requirements.rst b/doc/source/kubernetes.client.models.v1beta2_capacity_requirements.rst deleted file mode 100644 index 9ef95bf336..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_capacity_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_capacity\_requirements module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_capacity_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_cel_device_selector.rst b/doc/source/kubernetes.client.models.v1beta2_cel_device_selector.rst deleted file mode 100644 index 43ee8ae205..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_cel\_device\_selector module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_cel_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_counter.rst b/doc/source/kubernetes.client.models.v1beta2_counter.rst deleted file mode 100644 index 49b6de7ef1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_counter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_counter module -================================================ - -.. automodule:: kubernetes.client.models.v1beta2_counter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_counter_set.rst b/doc/source/kubernetes.client.models.v1beta2_counter_set.rst deleted file mode 100644 index d1404df1e0..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_counter_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_counter\_set module -===================================================== - -.. automodule:: kubernetes.client.models.v1beta2_counter_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device.rst b/doc/source/kubernetes.client.models.v1beta2_device.rst deleted file mode 100644 index 9454355412..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device module -=============================================== - -.. automodule:: kubernetes.client.models.v1beta2_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_allocation_configuration.rst b/doc/source/kubernetes.client.models.v1beta2_device_allocation_configuration.rst deleted file mode 100644 index 1d3bdd9a92..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_allocation_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_allocation\_configuration module -========================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_allocation_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_allocation_result.rst b/doc/source/kubernetes.client.models.v1beta2_device_allocation_result.rst deleted file mode 100644 index e7a5e26b69..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_allocation\_result module -=================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_attribute.rst b/doc/source/kubernetes.client.models.v1beta2_device_attribute.rst deleted file mode 100644 index 220faaaee1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_attribute module -========================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_capacity.rst b/doc/source/kubernetes.client.models.v1beta2_device_capacity.rst deleted file mode 100644 index fe3f342ee1..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_capacity module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta2_device_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_claim.rst b/doc/source/kubernetes.client.models.v1beta2_device_claim.rst deleted file mode 100644 index 611383e553..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_claim module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_claim_configuration.rst b/doc/source/kubernetes.client.models.v1beta2_device_claim_configuration.rst deleted file mode 100644 index 03533961b2..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_claim_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_claim\_configuration module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_claim_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_class.rst b/doc/source/kubernetes.client.models.v1beta2_device_class.rst deleted file mode 100644 index fe2eb4048c..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_class module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_class_configuration.rst b/doc/source/kubernetes.client.models.v1beta2_device_class_configuration.rst deleted file mode 100644 index 06de448526..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_class_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_class\_configuration module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_class_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_class_list.rst b/doc/source/kubernetes.client.models.v1beta2_device_class_list.rst deleted file mode 100644 index c91a42e58a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_class\_list module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta2_device_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_class_spec.rst b/doc/source/kubernetes.client.models.v1beta2_device_class_spec.rst deleted file mode 100644 index f847a153e0..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_class\_spec module -============================================================ - -.. automodule:: kubernetes.client.models.v1beta2_device_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_constraint.rst b/doc/source/kubernetes.client.models.v1beta2_device_constraint.rst deleted file mode 100644 index dcca06e9c5..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_constraint module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_counter_consumption.rst b/doc/source/kubernetes.client.models.v1beta2_device_counter_consumption.rst deleted file mode 100644 index d9ff9e119a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_counter_consumption.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_counter\_consumption module -===================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_counter_consumption - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_request.rst b/doc/source/kubernetes.client.models.v1beta2_device_request.rst deleted file mode 100644 index 2f7198bd16..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_request module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_request_allocation_result.rst b/doc/source/kubernetes.client.models.v1beta2_device_request_allocation_result.rst deleted file mode 100644 index 413d648648..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_request_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_request\_allocation\_result module -============================================================================ - -.. automodule:: kubernetes.client.models.v1beta2_device_request_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_selector.rst b/doc/source/kubernetes.client.models.v1beta2_device_selector.rst deleted file mode 100644 index e0b72516a2..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_selector module -========================================================= - -.. automodule:: kubernetes.client.models.v1beta2_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_sub_request.rst b/doc/source/kubernetes.client.models.v1beta2_device_sub_request.rst deleted file mode 100644 index 93bc972f61..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_sub_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_sub\_request module -============================================================= - -.. automodule:: kubernetes.client.models.v1beta2_device_sub_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_taint.rst b/doc/source/kubernetes.client.models.v1beta2_device_taint.rst deleted file mode 100644 index 4cac480c3f..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_taint module -====================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_device_toleration.rst b/doc/source/kubernetes.client.models.v1beta2_device_toleration.rst deleted file mode 100644 index a4591acd16..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_device_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_device\_toleration module -=========================================================== - -.. automodule:: kubernetes.client.models.v1beta2_device_toleration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_exact_device_request.rst b/doc/source/kubernetes.client.models.v1beta2_exact_device_request.rst deleted file mode 100644 index fac673543b..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_exact_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_exact\_device\_request module -=============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_exact_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_network_device_data.rst b/doc/source/kubernetes.client.models.v1beta2_network_device_data.rst deleted file mode 100644 index 81bd8761db..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_network_device_data.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_network\_device\_data module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_network_device_data - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_opaque_device_configuration.rst b/doc/source/kubernetes.client.models.v1beta2_opaque_device_configuration.rst deleted file mode 100644 index 5bfec865a0..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_opaque_device_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_opaque\_device\_configuration module -====================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_opaque_device_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim.rst deleted file mode 100644 index 367db3507a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_consumer_reference.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_consumer_reference.rst deleted file mode 100644 index e9b061ee27..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_consumer\_reference module -============================================================================= - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_list.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_list.rst deleted file mode 100644 index e3c37219d5..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_list module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_spec.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_spec.rst deleted file mode 100644 index 6731ef2c3d..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_spec module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_status.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_status.rst deleted file mode 100644 index 8d542bfccc..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_status module -================================================================ - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_template.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_template.rst deleted file mode 100644 index 71fa0eca2a..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_template module -================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_template_list.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_template_list.rst deleted file mode 100644 index abbcad01c7..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_template\_list module -======================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_claim_template_spec.rst b/doc/source/kubernetes.client.models.v1beta2_resource_claim_template_spec.rst deleted file mode 100644 index 01ba49b801..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_claim\_template\_spec module -======================================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_claim_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_pool.rst b/doc/source/kubernetes.client.models.v1beta2_resource_pool.rst deleted file mode 100644 index e5dfa539cd..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_pool.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_pool module -======================================================= - -.. automodule:: kubernetes.client.models.v1beta2_resource_pool - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_slice.rst b/doc/source/kubernetes.client.models.v1beta2_resource_slice.rst deleted file mode 100644 index 678cfe6277..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_slice module -======================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_slice_list.rst b/doc/source/kubernetes.client.models.v1beta2_resource_slice_list.rst deleted file mode 100644 index 58079bfa5d..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_slice\_list module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.client.models.v1beta2_resource_slice_spec.rst b/doc/source/kubernetes.client.models.v1beta2_resource_slice_spec.rst deleted file mode 100644 index c6f1f26532..0000000000 --- a/doc/source/kubernetes.client.models.v1beta2_resource_slice_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.client.models.v1beta2\_resource\_slice\_spec module -============================================================== - -.. automodule:: kubernetes.client.models.v1beta2_resource_slice_spec - :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 2ec3a14e5d..0000000000 --- a/doc/source/kubernetes.test.rst +++ /dev/null @@ -1,799 +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_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_certificates_v1beta1_api - kubernetes.test.test_coordination_api - kubernetes.test.test_coordination_v1_api - kubernetes.test.test_coordination_v1alpha2_api - kubernetes.test.test_coordination_v1beta1_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_core_v1_resource_claim - 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_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_v1beta1_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_v1_api - kubernetes.test.test_resource_v1_resource_claim - kubernetes.test.test_resource_v1alpha3_api - kubernetes.test.test_resource_v1beta1_api - kubernetes.test.test_resource_v1beta2_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_storage_v1beta1_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_allocated_device_status - kubernetes.test.test_v1_allocation_result - 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_capacity_request_policy - kubernetes.test.test_v1_capacity_request_policy_range - kubernetes.test.test_v1_capacity_requirements - kubernetes.test.test_v1_cel_device_selector - 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_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_extended_resource_request - kubernetes.test.test_v1_container_image - kubernetes.test.test_v1_container_port - kubernetes.test.test_v1_container_resize_policy - kubernetes.test.test_v1_container_restart_rule - kubernetes.test.test_v1_container_restart_rule_on_exit_codes - 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_container_user - kubernetes.test.test_v1_controller_revision - kubernetes.test.test_v1_controller_revision_list - kubernetes.test.test_v1_counter - kubernetes.test.test_v1_counter_set - 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_device - kubernetes.test.test_v1_device_allocation_configuration - kubernetes.test.test_v1_device_allocation_result - kubernetes.test.test_v1_device_attribute - kubernetes.test.test_v1_device_capacity - kubernetes.test.test_v1_device_claim - kubernetes.test.test_v1_device_claim_configuration - kubernetes.test.test_v1_device_class - kubernetes.test.test_v1_device_class_configuration - kubernetes.test.test_v1_device_class_list - kubernetes.test.test_v1_device_class_spec - kubernetes.test.test_v1_device_constraint - kubernetes.test.test_v1_device_counter_consumption - kubernetes.test.test_v1_device_request - kubernetes.test.test_v1_device_request_allocation_result - kubernetes.test.test_v1_device_selector - kubernetes.test.test_v1_device_sub_request - kubernetes.test.test_v1_device_taint - kubernetes.test.test_v1_device_toleration - 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_exact_device_request - 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_field_selector_attributes - kubernetes.test.test_v1_field_selector_requirement - kubernetes.test.test_v1_file_key_selector - 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_node - 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_image_volume_source - 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_address - kubernetes.test.test_v1_ip_address_list - kubernetes.test.test_v1_ip_address_spec - 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_attributes - 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_linux_container_user - 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_device_data - 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_features - 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_swap_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_opaque_device_configuration - 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_parent_reference - 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_certificate_projection - 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_extended_resource_claim_status - 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_consumer_reference - kubernetes.test.test_v1_resource_claim_list - kubernetes.test.test_v1_resource_claim_spec - kubernetes.test.test_v1_resource_claim_status - kubernetes.test.test_v1_resource_claim_template - kubernetes.test.test_v1_resource_claim_template_list - kubernetes.test.test_v1_resource_claim_template_spec - kubernetes.test.test_v1_resource_field_selector - kubernetes.test.test_v1_resource_health - kubernetes.test.test_v1_resource_policy_rule - kubernetes.test.test_v1_resource_pool - 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_resource_slice - kubernetes.test.test_v1_resource_slice_list - kubernetes.test.test_v1_resource_slice_spec - kubernetes.test.test_v1_resource_status - 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_cidr - kubernetes.test.test_v1_service_cidr_list - kubernetes.test.test_v1_service_cidr_spec - kubernetes.test.test_v1_service_cidr_status - 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_attributes_class - kubernetes.test.test_v1_volume_attributes_class_list - 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_apply_configuration - 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_group_version_resource - kubernetes.test.test_v1alpha1_json_patch - kubernetes.test.test_v1alpha1_match_condition - kubernetes.test.test_v1alpha1_match_resources - kubernetes.test.test_v1alpha1_migration_condition - kubernetes.test.test_v1alpha1_mutating_admission_policy - kubernetes.test.test_v1alpha1_mutating_admission_policy_binding - kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_list - kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_spec - kubernetes.test.test_v1alpha1_mutating_admission_policy_list - kubernetes.test.test_v1alpha1_mutating_admission_policy_spec - kubernetes.test.test_v1alpha1_mutation - kubernetes.test.test_v1alpha1_named_rule_with_operations - kubernetes.test.test_v1alpha1_param_kind - kubernetes.test.test_v1alpha1_param_ref - kubernetes.test.test_v1alpha1_pod_certificate_request - kubernetes.test.test_v1alpha1_pod_certificate_request_list - kubernetes.test.test_v1alpha1_pod_certificate_request_spec - kubernetes.test.test_v1alpha1_pod_certificate_request_status - kubernetes.test.test_v1alpha1_server_storage_version - 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_variable - kubernetes.test.test_v1alpha1_volume_attributes_class - kubernetes.test.test_v1alpha1_volume_attributes_class_list - kubernetes.test.test_v1alpha2_lease_candidate - kubernetes.test.test_v1alpha2_lease_candidate_list - kubernetes.test.test_v1alpha2_lease_candidate_spec - kubernetes.test.test_v1alpha3_cel_device_selector - kubernetes.test.test_v1alpha3_device_selector - kubernetes.test.test_v1alpha3_device_taint - kubernetes.test.test_v1alpha3_device_taint_rule - kubernetes.test.test_v1alpha3_device_taint_rule_list - kubernetes.test.test_v1alpha3_device_taint_rule_spec - kubernetes.test.test_v1alpha3_device_taint_selector - kubernetes.test.test_v1beta1_allocated_device_status - kubernetes.test.test_v1beta1_allocation_result - kubernetes.test.test_v1beta1_apply_configuration - kubernetes.test.test_v1beta1_basic_device - kubernetes.test.test_v1beta1_capacity_request_policy - kubernetes.test.test_v1beta1_capacity_request_policy_range - kubernetes.test.test_v1beta1_capacity_requirements - kubernetes.test.test_v1beta1_cel_device_selector - kubernetes.test.test_v1beta1_cluster_trust_bundle - kubernetes.test.test_v1beta1_cluster_trust_bundle_list - kubernetes.test.test_v1beta1_cluster_trust_bundle_spec - kubernetes.test.test_v1beta1_counter - kubernetes.test.test_v1beta1_counter_set - kubernetes.test.test_v1beta1_device - kubernetes.test.test_v1beta1_device_allocation_configuration - kubernetes.test.test_v1beta1_device_allocation_result - kubernetes.test.test_v1beta1_device_attribute - kubernetes.test.test_v1beta1_device_capacity - kubernetes.test.test_v1beta1_device_claim - kubernetes.test.test_v1beta1_device_claim_configuration - kubernetes.test.test_v1beta1_device_class - kubernetes.test.test_v1beta1_device_class_configuration - kubernetes.test.test_v1beta1_device_class_list - kubernetes.test.test_v1beta1_device_class_spec - kubernetes.test.test_v1beta1_device_constraint - kubernetes.test.test_v1beta1_device_counter_consumption - kubernetes.test.test_v1beta1_device_request - kubernetes.test.test_v1beta1_device_request_allocation_result - kubernetes.test.test_v1beta1_device_selector - kubernetes.test.test_v1beta1_device_sub_request - kubernetes.test.test_v1beta1_device_taint - kubernetes.test.test_v1beta1_device_toleration - kubernetes.test.test_v1beta1_ip_address - kubernetes.test.test_v1beta1_ip_address_list - kubernetes.test.test_v1beta1_ip_address_spec - kubernetes.test.test_v1beta1_json_patch - kubernetes.test.test_v1beta1_lease_candidate - kubernetes.test.test_v1beta1_lease_candidate_list - kubernetes.test.test_v1beta1_lease_candidate_spec - kubernetes.test.test_v1beta1_match_condition - kubernetes.test.test_v1beta1_match_resources - kubernetes.test.test_v1beta1_mutating_admission_policy - kubernetes.test.test_v1beta1_mutating_admission_policy_binding - kubernetes.test.test_v1beta1_mutating_admission_policy_binding_list - kubernetes.test.test_v1beta1_mutating_admission_policy_binding_spec - kubernetes.test.test_v1beta1_mutating_admission_policy_list - kubernetes.test.test_v1beta1_mutating_admission_policy_spec - kubernetes.test.test_v1beta1_mutation - kubernetes.test.test_v1beta1_named_rule_with_operations - kubernetes.test.test_v1beta1_network_device_data - kubernetes.test.test_v1beta1_opaque_device_configuration - kubernetes.test.test_v1beta1_param_kind - kubernetes.test.test_v1beta1_param_ref - kubernetes.test.test_v1beta1_parent_reference - kubernetes.test.test_v1beta1_resource_claim - kubernetes.test.test_v1beta1_resource_claim_consumer_reference - kubernetes.test.test_v1beta1_resource_claim_list - kubernetes.test.test_v1beta1_resource_claim_spec - kubernetes.test.test_v1beta1_resource_claim_status - kubernetes.test.test_v1beta1_resource_claim_template - kubernetes.test.test_v1beta1_resource_claim_template_list - kubernetes.test.test_v1beta1_resource_claim_template_spec - kubernetes.test.test_v1beta1_resource_pool - kubernetes.test.test_v1beta1_resource_slice - kubernetes.test.test_v1beta1_resource_slice_list - kubernetes.test.test_v1beta1_resource_slice_spec - kubernetes.test.test_v1beta1_service_cidr - kubernetes.test.test_v1beta1_service_cidr_list - kubernetes.test.test_v1beta1_service_cidr_spec - kubernetes.test.test_v1beta1_service_cidr_status - kubernetes.test.test_v1beta1_variable - kubernetes.test.test_v1beta1_volume_attributes_class - kubernetes.test.test_v1beta1_volume_attributes_class_list - kubernetes.test.test_v1beta2_allocated_device_status - kubernetes.test.test_v1beta2_allocation_result - kubernetes.test.test_v1beta2_capacity_request_policy - kubernetes.test.test_v1beta2_capacity_request_policy_range - kubernetes.test.test_v1beta2_capacity_requirements - kubernetes.test.test_v1beta2_cel_device_selector - kubernetes.test.test_v1beta2_counter - kubernetes.test.test_v1beta2_counter_set - kubernetes.test.test_v1beta2_device - kubernetes.test.test_v1beta2_device_allocation_configuration - kubernetes.test.test_v1beta2_device_allocation_result - kubernetes.test.test_v1beta2_device_attribute - kubernetes.test.test_v1beta2_device_capacity - kubernetes.test.test_v1beta2_device_claim - kubernetes.test.test_v1beta2_device_claim_configuration - kubernetes.test.test_v1beta2_device_class - kubernetes.test.test_v1beta2_device_class_configuration - kubernetes.test.test_v1beta2_device_class_list - kubernetes.test.test_v1beta2_device_class_spec - kubernetes.test.test_v1beta2_device_constraint - kubernetes.test.test_v1beta2_device_counter_consumption - kubernetes.test.test_v1beta2_device_request - kubernetes.test.test_v1beta2_device_request_allocation_result - kubernetes.test.test_v1beta2_device_selector - kubernetes.test.test_v1beta2_device_sub_request - kubernetes.test.test_v1beta2_device_taint - kubernetes.test.test_v1beta2_device_toleration - kubernetes.test.test_v1beta2_exact_device_request - kubernetes.test.test_v1beta2_network_device_data - kubernetes.test.test_v1beta2_opaque_device_configuration - kubernetes.test.test_v1beta2_resource_claim - kubernetes.test.test_v1beta2_resource_claim_consumer_reference - kubernetes.test.test_v1beta2_resource_claim_list - kubernetes.test.test_v1beta2_resource_claim_spec - kubernetes.test.test_v1beta2_resource_claim_status - kubernetes.test.test_v1beta2_resource_claim_template - kubernetes.test.test_v1beta2_resource_claim_template_list - kubernetes.test.test_v1beta2_resource_claim_template_spec - kubernetes.test.test_v1beta2_resource_pool - kubernetes.test.test_v1beta2_resource_slice - kubernetes.test.test_v1beta2_resource_slice_list - kubernetes.test.test_v1beta2_resource_slice_spec - 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_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_certificates_v1beta1_api.rst b/doc/source/kubernetes.test.test_certificates_v1beta1_api.rst deleted file mode 100644 index 2cfcc0286a..0000000000 --- a/doc/source/kubernetes.test.test_certificates_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_certificates\_v1beta1\_api module -======================================================= - -.. automodule:: kubernetes.test.test_certificates_v1beta1_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_coordination_v1alpha2_api.rst b/doc/source/kubernetes.test.test_coordination_v1alpha2_api.rst deleted file mode 100644 index 1efcee8257..0000000000 --- a/doc/source/kubernetes.test.test_coordination_v1alpha2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_coordination\_v1alpha2\_api module -======================================================== - -.. automodule:: kubernetes.test.test_coordination_v1alpha2_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_coordination_v1beta1_api.rst b/doc/source/kubernetes.test.test_coordination_v1beta1_api.rst deleted file mode 100644 index 314f8905ee..0000000000 --- a/doc/source/kubernetes.test.test_coordination_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_coordination\_v1beta1\_api module -======================================================= - -.. automodule:: kubernetes.test.test_coordination_v1beta1_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_core_v1_resource_claim.rst b/doc/source/kubernetes.test.test_core_v1_resource_claim.rst deleted file mode 100644 index 203a6baf1d..0000000000 --- a/doc/source/kubernetes.test.test_core_v1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_core\_v1\_resource\_claim module -====================================================== - -.. automodule:: kubernetes.test.test_core_v1_resource_claim - :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_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_v1beta1_api.rst b/doc/source/kubernetes.test.test_networking_v1beta1_api.rst deleted file mode 100644 index 0288164a74..0000000000 --- a/doc/source/kubernetes.test.test_networking_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_networking\_v1beta1\_api module -===================================================== - -.. automodule:: kubernetes.test.test_networking_v1beta1_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_v1_api.rst b/doc/source/kubernetes.test.test_resource_v1_api.rst deleted file mode 100644 index 3d7527ea68..0000000000 --- a/doc/source/kubernetes.test.test_resource_v1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_v1\_api module -============================================== - -.. automodule:: kubernetes.test.test_resource_v1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_resource_v1_resource_claim.rst b/doc/source/kubernetes.test.test_resource_v1_resource_claim.rst deleted file mode 100644 index 0c3912dd52..0000000000 --- a/doc/source/kubernetes.test.test_resource_v1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_v1\_resource\_claim module -========================================================== - -.. automodule:: kubernetes.test.test_resource_v1_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_resource_v1alpha3_api.rst b/doc/source/kubernetes.test.test_resource_v1alpha3_api.rst deleted file mode 100644 index 056024c4a7..0000000000 --- a/doc/source/kubernetes.test.test_resource_v1alpha3_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_v1alpha3\_api module -==================================================== - -.. automodule:: kubernetes.test.test_resource_v1alpha3_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_resource_v1beta1_api.rst b/doc/source/kubernetes.test.test_resource_v1beta1_api.rst deleted file mode 100644 index 059d34fc83..0000000000 --- a/doc/source/kubernetes.test.test_resource_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_v1beta1\_api module -=================================================== - -.. automodule:: kubernetes.test.test_resource_v1beta1_api - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_resource_v1beta2_api.rst b/doc/source/kubernetes.test.test_resource_v1beta2_api.rst deleted file mode 100644 index 9f2dc17d14..0000000000 --- a/doc/source/kubernetes.test.test_resource_v1beta2_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_resource\_v1beta2\_api module -=================================================== - -.. automodule:: kubernetes.test.test_resource_v1beta2_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_storage_v1beta1_api.rst b/doc/source/kubernetes.test.test_storage_v1beta1_api.rst deleted file mode 100644 index 9f7394374a..0000000000 --- a/doc/source/kubernetes.test.test_storage_v1beta1_api.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_storage\_v1beta1\_api module -================================================== - -.. automodule:: kubernetes.test.test_storage_v1beta1_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_allocated_device_status.rst b/doc/source/kubernetes.test.test_v1_allocated_device_status.rst deleted file mode 100644 index c727899cb0..0000000000 --- a/doc/source/kubernetes.test.test_v1_allocated_device_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_allocated\_device\_status module -========================================================== - -.. automodule:: kubernetes.test.test_v1_allocated_device_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_allocation_result.rst b/doc/source/kubernetes.test.test_v1_allocation_result.rst deleted file mode 100644 index a23daec067..0000000000 --- a/doc/source/kubernetes.test.test_v1_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_allocation\_result module -=================================================== - -.. automodule:: kubernetes.test.test_v1_allocation_result - :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_capacity_request_policy.rst b/doc/source/kubernetes.test.test_v1_capacity_request_policy.rst deleted file mode 100644 index f0137990cc..0000000000 --- a/doc/source/kubernetes.test.test_v1_capacity_request_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_capacity\_request\_policy module -========================================================== - -.. automodule:: kubernetes.test.test_v1_capacity_request_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_capacity_request_policy_range.rst b/doc/source/kubernetes.test.test_v1_capacity_request_policy_range.rst deleted file mode 100644 index b6a6b406df..0000000000 --- a/doc/source/kubernetes.test.test_v1_capacity_request_policy_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_capacity\_request\_policy\_range module -================================================================= - -.. automodule:: kubernetes.test.test_v1_capacity_request_policy_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_capacity_requirements.rst b/doc/source/kubernetes.test.test_v1_capacity_requirements.rst deleted file mode 100644 index 3348abd0af..0000000000 --- a/doc/source/kubernetes.test.test_v1_capacity_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_capacity\_requirements module -======================================================= - -.. automodule:: kubernetes.test.test_v1_capacity_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_cel_device_selector.rst b/doc/source/kubernetes.test.test_v1_cel_device_selector.rst deleted file mode 100644 index 67d77cb5c5..0000000000 --- a/doc/source/kubernetes.test.test_v1_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_cel\_device\_selector module -====================================================== - -.. automodule:: kubernetes.test.test_v1_cel_device_selector - :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_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_extended_resource_request.rst b/doc/source/kubernetes.test.test_v1_container_extended_resource_request.rst deleted file mode 100644 index 53bc392c9c..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_extended_resource_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_extended\_resource\_request module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_container_extended_resource_request - :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_restart_rule.rst b/doc/source/kubernetes.test.test_v1_container_restart_rule.rst deleted file mode 100644 index 79002f4f62..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_restart_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_restart\_rule module -========================================================= - -.. automodule:: kubernetes.test.test_v1_container_restart_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_container_restart_rule_on_exit_codes.rst b/doc/source/kubernetes.test.test_v1_container_restart_rule_on_exit_codes.rst deleted file mode 100644 index a0826ff10f..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_restart_rule_on_exit_codes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_restart\_rule\_on\_exit\_codes module -========================================================================== - -.. automodule:: kubernetes.test.test_v1_container_restart_rule_on_exit_codes - :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_container_user.rst b/doc/source/kubernetes.test.test_v1_container_user.rst deleted file mode 100644 index 3659d3746b..0000000000 --- a/doc/source/kubernetes.test.test_v1_container_user.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_container\_user module -================================================ - -.. automodule:: kubernetes.test.test_v1_container_user - :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_counter.rst b/doc/source/kubernetes.test.test_v1_counter.rst deleted file mode 100644 index b81dbf3af4..0000000000 --- a/doc/source/kubernetes.test.test_v1_counter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_counter module -======================================== - -.. automodule:: kubernetes.test.test_v1_counter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_counter_set.rst b/doc/source/kubernetes.test.test_v1_counter_set.rst deleted file mode 100644 index df4f914967..0000000000 --- a/doc/source/kubernetes.test.test_v1_counter_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_counter\_set module -============================================= - -.. automodule:: kubernetes.test.test_v1_counter_set - :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_device.rst b/doc/source/kubernetes.test.test_v1_device.rst deleted file mode 100644 index 011f029768..0000000000 --- a/doc/source/kubernetes.test.test_v1_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device module -======================================= - -.. automodule:: kubernetes.test.test_v1_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_allocation_configuration.rst b/doc/source/kubernetes.test.test_v1_device_allocation_configuration.rst deleted file mode 100644 index 9c2b03cede..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_allocation_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_allocation\_configuration module -================================================================== - -.. automodule:: kubernetes.test.test_v1_device_allocation_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_allocation_result.rst b/doc/source/kubernetes.test.test_v1_device_allocation_result.rst deleted file mode 100644 index 082c91bb4f..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_allocation\_result module -=========================================================== - -.. automodule:: kubernetes.test.test_v1_device_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_attribute.rst b/doc/source/kubernetes.test.test_v1_device_attribute.rst deleted file mode 100644 index c88b2421e3..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_attribute module -================================================== - -.. automodule:: kubernetes.test.test_v1_device_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_capacity.rst b/doc/source/kubernetes.test.test_v1_device_capacity.rst deleted file mode 100644 index ee71560822..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_capacity module -================================================= - -.. automodule:: kubernetes.test.test_v1_device_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_claim.rst b/doc/source/kubernetes.test.test_v1_device_claim.rst deleted file mode 100644 index bc32c5b052..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_claim module -============================================== - -.. automodule:: kubernetes.test.test_v1_device_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_claim_configuration.rst b/doc/source/kubernetes.test.test_v1_device_claim_configuration.rst deleted file mode 100644 index 5b3de72c3b..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_claim_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_claim\_configuration module -============================================================= - -.. automodule:: kubernetes.test.test_v1_device_claim_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_class.rst b/doc/source/kubernetes.test.test_v1_device_class.rst deleted file mode 100644 index cfda7166e0..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_class module -============================================== - -.. automodule:: kubernetes.test.test_v1_device_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_class_configuration.rst b/doc/source/kubernetes.test.test_v1_device_class_configuration.rst deleted file mode 100644 index 81ed5ec7c8..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_class_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_class\_configuration module -============================================================= - -.. automodule:: kubernetes.test.test_v1_device_class_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_class_list.rst b/doc/source/kubernetes.test.test_v1_device_class_list.rst deleted file mode 100644 index df12055a18..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_class\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_device_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_class_spec.rst b/doc/source/kubernetes.test.test_v1_device_class_spec.rst deleted file mode 100644 index 50dd955798..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_class\_spec module -==================================================== - -.. automodule:: kubernetes.test.test_v1_device_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_constraint.rst b/doc/source/kubernetes.test.test_v1_device_constraint.rst deleted file mode 100644 index 23ec3932d1..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_constraint module -=================================================== - -.. automodule:: kubernetes.test.test_v1_device_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_counter_consumption.rst b/doc/source/kubernetes.test.test_v1_device_counter_consumption.rst deleted file mode 100644 index d6ce1699e1..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_counter_consumption.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_counter\_consumption module -============================================================= - -.. automodule:: kubernetes.test.test_v1_device_counter_consumption - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_request.rst b/doc/source/kubernetes.test.test_v1_device_request.rst deleted file mode 100644 index 5d53c0f7ce..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_request module -================================================ - -.. automodule:: kubernetes.test.test_v1_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_request_allocation_result.rst b/doc/source/kubernetes.test.test_v1_device_request_allocation_result.rst deleted file mode 100644 index 1eb36751bd..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_request_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_request\_allocation\_result module -==================================================================== - -.. automodule:: kubernetes.test.test_v1_device_request_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_selector.rst b/doc/source/kubernetes.test.test_v1_device_selector.rst deleted file mode 100644 index 067402750c..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_selector module -================================================= - -.. automodule:: kubernetes.test.test_v1_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_sub_request.rst b/doc/source/kubernetes.test.test_v1_device_sub_request.rst deleted file mode 100644 index 1bf2349f83..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_sub_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_sub\_request module -===================================================== - -.. automodule:: kubernetes.test.test_v1_device_sub_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_taint.rst b/doc/source/kubernetes.test.test_v1_device_taint.rst deleted file mode 100644 index a6fe5c5f87..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_taint module -============================================== - -.. automodule:: kubernetes.test.test_v1_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_device_toleration.rst b/doc/source/kubernetes.test.test_v1_device_toleration.rst deleted file mode 100644 index 631c0679db..0000000000 --- a/doc/source/kubernetes.test.test_v1_device_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_device\_toleration module -=================================================== - -.. automodule:: kubernetes.test.test_v1_device_toleration - :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_exact_device_request.rst b/doc/source/kubernetes.test.test_v1_exact_device_request.rst deleted file mode 100644 index 3686ea5053..0000000000 --- a/doc/source/kubernetes.test.test_v1_exact_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_exact\_device\_request module -======================================================= - -.. automodule:: kubernetes.test.test_v1_exact_device_request - :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_field_selector_attributes.rst b/doc/source/kubernetes.test.test_v1_field_selector_attributes.rst deleted file mode 100644 index 333d5f1139..0000000000 --- a/doc/source/kubernetes.test.test_v1_field_selector_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_field\_selector\_attributes module -============================================================ - -.. automodule:: kubernetes.test.test_v1_field_selector_attributes - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_field_selector_requirement.rst b/doc/source/kubernetes.test.test_v1_field_selector_requirement.rst deleted file mode 100644 index 89ec613506..0000000000 --- a/doc/source/kubernetes.test.test_v1_field_selector_requirement.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_field\_selector\_requirement module -============================================================= - -.. automodule:: kubernetes.test.test_v1_field_selector_requirement - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_file_key_selector.rst b/doc/source/kubernetes.test.test_v1_file_key_selector.rst deleted file mode 100644 index 80d8df6162..0000000000 --- a/doc/source/kubernetes.test.test_v1_file_key_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_file\_key\_selector module -==================================================== - -.. automodule:: kubernetes.test.test_v1_file_key_selector - :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_node.rst b/doc/source/kubernetes.test.test_v1_for_node.rst deleted file mode 100644 index 5d6157ab77..0000000000 --- a/doc/source/kubernetes.test.test_v1_for_node.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_for\_node module -========================================== - -.. automodule:: kubernetes.test.test_v1_for_node - :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_image_volume_source.rst b/doc/source/kubernetes.test.test_v1_image_volume_source.rst deleted file mode 100644 index 928f464352..0000000000 --- a/doc/source/kubernetes.test.test_v1_image_volume_source.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_image\_volume\_source module -====================================================== - -.. automodule:: kubernetes.test.test_v1_image_volume_source - :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_address.rst b/doc/source/kubernetes.test.test_v1_ip_address.rst deleted file mode 100644 index 7b61b267bd..0000000000 --- a/doc/source/kubernetes.test.test_v1_ip_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ip\_address module -============================================ - -.. automodule:: kubernetes.test.test_v1_ip_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ip_address_list.rst b/doc/source/kubernetes.test.test_v1_ip_address_list.rst deleted file mode 100644 index cf60e3ed73..0000000000 --- a/doc/source/kubernetes.test.test_v1_ip_address_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ip\_address\_list module -================================================== - -.. automodule:: kubernetes.test.test_v1_ip_address_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_ip_address_spec.rst b/doc/source/kubernetes.test.test_v1_ip_address_spec.rst deleted file mode 100644 index f7670765ca..0000000000 --- a/doc/source/kubernetes.test.test_v1_ip_address_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_ip\_address\_spec module -================================================== - -.. automodule:: kubernetes.test.test_v1_ip_address_spec - :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_attributes.rst b/doc/source/kubernetes.test.test_v1_label_selector_attributes.rst deleted file mode 100644 index 9ef5884e5a..0000000000 --- a/doc/source/kubernetes.test.test_v1_label_selector_attributes.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_label\_selector\_attributes module -============================================================ - -.. automodule:: kubernetes.test.test_v1_label_selector_attributes - :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_linux_container_user.rst b/doc/source/kubernetes.test.test_v1_linux_container_user.rst deleted file mode 100644 index e457e70ff3..0000000000 --- a/doc/source/kubernetes.test.test_v1_linux_container_user.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_linux\_container\_user module -======================================================= - -.. automodule:: kubernetes.test.test_v1_linux_container_user - :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_device_data.rst b/doc/source/kubernetes.test.test_v1_network_device_data.rst deleted file mode 100644 index 37b36e75e9..0000000000 --- a/doc/source/kubernetes.test.test_v1_network_device_data.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_network\_device\_data module -====================================================== - -.. automodule:: kubernetes.test.test_v1_network_device_data - :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_features.rst b/doc/source/kubernetes.test.test_v1_node_features.rst deleted file mode 100644 index 3043dd5f2f..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_features.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_features module -=============================================== - -.. automodule:: kubernetes.test.test_v1_node_features - :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_swap_status.rst b/doc/source/kubernetes.test.test_v1_node_swap_status.rst deleted file mode 100644 index 79c97d8fdd..0000000000 --- a/doc/source/kubernetes.test.test_v1_node_swap_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_node\_swap\_status module -=================================================== - -.. automodule:: kubernetes.test.test_v1_node_swap_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_opaque_device_configuration.rst b/doc/source/kubernetes.test.test_v1_opaque_device_configuration.rst deleted file mode 100644 index 0175423b66..0000000000 --- a/doc/source/kubernetes.test.test_v1_opaque_device_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_opaque\_device\_configuration module -============================================================== - -.. automodule:: kubernetes.test.test_v1_opaque_device_configuration - :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_parent_reference.rst b/doc/source/kubernetes.test.test_v1_parent_reference.rst deleted file mode 100644 index 1b8b89cfae..0000000000 --- a/doc/source/kubernetes.test.test_v1_parent_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_parent\_reference module -================================================== - -.. automodule:: kubernetes.test.test_v1_parent_reference - :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_certificate_projection.rst b/doc/source/kubernetes.test.test_v1_pod_certificate_projection.rst deleted file mode 100644 index 0f4778c21f..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_certificate_projection.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_certificate\_projection module -============================================================= - -.. automodule:: kubernetes.test.test_v1_pod_certificate_projection - :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_extended_resource_claim_status.rst b/doc/source/kubernetes.test.test_v1_pod_extended_resource_claim_status.rst deleted file mode 100644 index 68e7ac55ca..0000000000 --- a/doc/source/kubernetes.test.test_v1_pod_extended_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_pod\_extended\_resource\_claim\_status module -======================================================================= - -.. automodule:: kubernetes.test.test_v1_pod_extended_resource_claim_status - :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_consumer_reference.rst b/doc/source/kubernetes.test.test_v1_resource_claim_consumer_reference.rst deleted file mode 100644 index e90902b2d3..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_consumer\_reference module -===================================================================== - -.. automodule:: kubernetes.test.test_v1_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim_list.rst b/doc/source/kubernetes.test.test_v1_resource_claim_list.rst deleted file mode 100644 index 9ef9ec6ca7..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_list module -====================================================== - -.. automodule:: kubernetes.test.test_v1_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim_spec.rst b/doc/source/kubernetes.test.test_v1_resource_claim_spec.rst deleted file mode 100644 index 4d632f7503..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_spec module -====================================================== - -.. automodule:: kubernetes.test.test_v1_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim_status.rst b/doc/source/kubernetes.test.test_v1_resource_claim_status.rst deleted file mode 100644 index 8abe6053db..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_status module -======================================================== - -.. automodule:: kubernetes.test.test_v1_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim_template.rst b/doc/source/kubernetes.test.test_v1_resource_claim_template.rst deleted file mode 100644 index ade3c713de..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_template module -========================================================== - -.. automodule:: kubernetes.test.test_v1_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim_template_list.rst b/doc/source/kubernetes.test.test_v1_resource_claim_template_list.rst deleted file mode 100644 index 12c74c10b8..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_template\_list module -================================================================ - -.. automodule:: kubernetes.test.test_v1_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_claim_template_spec.rst b/doc/source/kubernetes.test.test_v1_resource_claim_template_spec.rst deleted file mode 100644 index 6b5544582a..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_claim\_template\_spec module -================================================================ - -.. automodule:: kubernetes.test.test_v1_resource_claim_template_spec - :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_health.rst b/doc/source/kubernetes.test.test_v1_resource_health.rst deleted file mode 100644 index 093cf979bf..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_health.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_health module -================================================= - -.. automodule:: kubernetes.test.test_v1_resource_health - :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_pool.rst b/doc/source/kubernetes.test.test_v1_resource_pool.rst deleted file mode 100644 index a8ff15c397..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_pool.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_pool module -=============================================== - -.. automodule:: kubernetes.test.test_v1_resource_pool - :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_resource_slice.rst b/doc/source/kubernetes.test.test_v1_resource_slice.rst deleted file mode 100644 index 83c87d413a..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_slice module -================================================ - -.. automodule:: kubernetes.test.test_v1_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_slice_list.rst b/doc/source/kubernetes.test.test_v1_resource_slice_list.rst deleted file mode 100644 index f4fc60214f..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_slice\_list module -====================================================== - -.. automodule:: kubernetes.test.test_v1_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_slice_spec.rst b/doc/source/kubernetes.test.test_v1_resource_slice_spec.rst deleted file mode 100644 index b9a0de26c0..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_slice_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_slice\_spec module -====================================================== - -.. automodule:: kubernetes.test.test_v1_resource_slice_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_resource_status.rst b/doc/source/kubernetes.test.test_v1_resource_status.rst deleted file mode 100644 index 4cd0b3d9cb..0000000000 --- a/doc/source/kubernetes.test.test_v1_resource_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_resource\_status module -================================================= - -.. automodule:: kubernetes.test.test_v1_resource_status - :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_cidr.rst b/doc/source/kubernetes.test.test_v1_service_cidr.rst deleted file mode 100644 index 364053cfef..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_cidr module -============================================== - -.. automodule:: kubernetes.test.test_v1_service_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_cidr_list.rst b/doc/source/kubernetes.test.test_v1_service_cidr_list.rst deleted file mode 100644 index a9a7c9db3f..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_cidr_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_cidr\_list module -==================================================== - -.. automodule:: kubernetes.test.test_v1_service_cidr_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_cidr_spec.rst b/doc/source/kubernetes.test.test_v1_service_cidr_spec.rst deleted file mode 100644 index b7a4c07459..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_cidr_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_cidr\_spec module -==================================================== - -.. automodule:: kubernetes.test.test_v1_service_cidr_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_service_cidr_status.rst b/doc/source/kubernetes.test.test_v1_service_cidr_status.rst deleted file mode 100644 index af967d0e89..0000000000 --- a/doc/source/kubernetes.test.test_v1_service_cidr_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_service\_cidr\_status module -====================================================== - -.. automodule:: kubernetes.test.test_v1_service_cidr_status - :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_attributes_class.rst b/doc/source/kubernetes.test.test_v1_volume_attributes_class.rst deleted file mode 100644 index 7fcfdc7c96..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attributes_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attributes\_class module -========================================================== - -.. automodule:: kubernetes.test.test_v1_volume_attributes_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1_volume_attributes_class_list.rst b/doc/source/kubernetes.test.test_v1_volume_attributes_class_list.rst deleted file mode 100644 index 09bfa1397c..0000000000 --- a/doc/source/kubernetes.test.test_v1_volume_attributes_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1\_volume\_attributes\_class\_list module -================================================================ - -.. automodule:: kubernetes.test.test_v1_volume_attributes_class_list - :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_apply_configuration.rst b/doc/source/kubernetes.test.test_v1alpha1_apply_configuration.rst deleted file mode 100644 index 9d91ef4301..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_apply_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_apply\_configuration module -=========================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_apply_configuration - :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_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_json_patch.rst b/doc/source/kubernetes.test.test_v1alpha1_json_patch.rst deleted file mode 100644 index 9a151f6ddb..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_json_patch.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_json\_patch module -================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_json_patch - :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_mutating_admission_policy.rst b/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy.rst deleted file mode 100644 index 5bddb13b0a..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutating\_admission\_policy module -================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_mutating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding.rst b/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding.rst deleted file mode 100644 index ac0fa4e4fa..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutating\_admission\_policy\_binding module -=========================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_mutating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_list.rst b/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_list.rst deleted file mode 100644 index 9aadf797de..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutating\_admission\_policy\_binding\_list module -================================================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_spec.rst deleted file mode 100644 index 9ffd41a053..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutating\_admission\_policy\_binding\_spec module -================================================================================= - -.. automodule:: kubernetes.test.test_v1alpha1_mutating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_list.rst b/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_list.rst deleted file mode 100644 index bd0877962e..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutating\_admission\_policy\_list module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_mutating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_spec.rst deleted file mode 100644 index ad7aafa4d4..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutating\_admission\_policy\_spec module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_mutating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_mutation.rst b/doc/source/kubernetes.test.test_v1alpha1_mutation.rst deleted file mode 100644 index 4443e9d020..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_mutation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_mutation module -=============================================== - -.. automodule:: kubernetes.test.test_v1alpha1_mutation - :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_pod_certificate_request.rst b/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request.rst deleted file mode 100644 index 232770f363..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_pod\_certificate\_request module -================================================================ - -.. automodule:: kubernetes.test.test_v1alpha1_pod_certificate_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_list.rst b/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_list.rst deleted file mode 100644 index c597fe0842..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_pod\_certificate\_request\_list module -====================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_pod_certificate_request_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_spec.rst b/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_spec.rst deleted file mode 100644 index 79a431fd3b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_pod\_certificate\_request\_spec module -====================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_pod_certificate_request_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_status.rst b/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_status.rst deleted file mode 100644 index 7962d83b9f..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha1_pod_certificate_request_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha1\_pod\_certificate\_request\_status module -======================================================================== - -.. automodule:: kubernetes.test.test_v1alpha1_pod_certificate_request_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_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_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_lease_candidate.rst b/doc/source/kubernetes.test.test_v1alpha2_lease_candidate.rst deleted file mode 100644 index 61e2088ca4..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_lease_candidate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_lease\_candidate module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_lease_candidate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_lease_candidate_list.rst b/doc/source/kubernetes.test.test_v1alpha2_lease_candidate_list.rst deleted file mode 100644 index 726f40805b..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_lease_candidate_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_lease\_candidate\_list module -============================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_lease_candidate_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha2_lease_candidate_spec.rst b/doc/source/kubernetes.test.test_v1alpha2_lease_candidate_spec.rst deleted file mode 100644 index 0a0e1a2e79..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha2_lease_candidate_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha2\_lease\_candidate\_spec module -============================================================= - -.. automodule:: kubernetes.test.test_v1alpha2_lease_candidate_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_cel_device_selector.rst b/doc/source/kubernetes.test.test_v1alpha3_cel_device_selector.rst deleted file mode 100644 index 6330cd85f6..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_cel\_device\_selector module -============================================================ - -.. automodule:: kubernetes.test.test_v1alpha3_cel_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_device_selector.rst b/doc/source/kubernetes.test.test_v1alpha3_device_selector.rst deleted file mode 100644 index a63f59c493..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_device\_selector module -======================================================= - -.. automodule:: kubernetes.test.test_v1alpha3_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_device_taint.rst b/doc/source/kubernetes.test.test_v1alpha3_device_taint.rst deleted file mode 100644 index e9860c435c..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_device\_taint module -==================================================== - -.. automodule:: kubernetes.test.test_v1alpha3_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule.rst b/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule.rst deleted file mode 100644 index a78eb3427a..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_device\_taint\_rule module -========================================================== - -.. automodule:: kubernetes.test.test_v1alpha3_device_taint_rule - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule_list.rst b/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule_list.rst deleted file mode 100644 index b7a2d778b1..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_device\_taint\_rule\_list module -================================================================ - -.. automodule:: kubernetes.test.test_v1alpha3_device_taint_rule_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule_spec.rst b/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule_spec.rst deleted file mode 100644 index aceebea2a8..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_device_taint_rule_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_device\_taint\_rule\_spec module -================================================================ - -.. automodule:: kubernetes.test.test_v1alpha3_device_taint_rule_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1alpha3_device_taint_selector.rst b/doc/source/kubernetes.test.test_v1alpha3_device_taint_selector.rst deleted file mode 100644 index af640e17cb..0000000000 --- a/doc/source/kubernetes.test.test_v1alpha3_device_taint_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1alpha3\_device\_taint\_selector module -============================================================== - -.. automodule:: kubernetes.test.test_v1alpha3_device_taint_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_allocated_device_status.rst b/doc/source/kubernetes.test.test_v1beta1_allocated_device_status.rst deleted file mode 100644 index 58f5d2b754..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_allocated_device_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_allocated\_device\_status module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta1_allocated_device_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_allocation_result.rst b/doc/source/kubernetes.test.test_v1beta1_allocation_result.rst deleted file mode 100644 index 0d01d4ed88..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_allocation\_result module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta1_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_apply_configuration.rst b/doc/source/kubernetes.test.test_v1beta1_apply_configuration.rst deleted file mode 100644 index e354a9cb7c..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_apply_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_apply\_configuration module -========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_apply_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_basic_device.rst b/doc/source/kubernetes.test.test_v1beta1_basic_device.rst deleted file mode 100644 index c7312d80c8..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_basic_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_basic\_device module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta1_basic_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_capacity_request_policy.rst b/doc/source/kubernetes.test.test_v1beta1_capacity_request_policy.rst deleted file mode 100644 index e736ba904a..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_capacity_request_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_capacity\_request\_policy module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta1_capacity_request_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_capacity_request_policy_range.rst b/doc/source/kubernetes.test.test_v1beta1_capacity_request_policy_range.rst deleted file mode 100644 index 333fd1652b..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_capacity_request_policy_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_capacity\_request\_policy\_range module -====================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_capacity_request_policy_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_capacity_requirements.rst b/doc/source/kubernetes.test.test_v1beta1_capacity_requirements.rst deleted file mode 100644 index 3ccc878ec0..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_capacity_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_capacity\_requirements module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta1_capacity_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_cel_device_selector.rst b/doc/source/kubernetes.test.test_v1beta1_cel_device_selector.rst deleted file mode 100644 index f015590b74..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_cel\_device\_selector module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_cel_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle.rst b/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle.rst deleted file mode 100644 index 91be2b59e4..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_cluster\_trust\_bundle module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta1_cluster_trust_bundle - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle_list.rst b/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle_list.rst deleted file mode 100644 index 95849e94db..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_cluster\_trust\_bundle\_list module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_cluster_trust_bundle_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle_spec.rst b/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle_spec.rst deleted file mode 100644 index 1be634fbb6..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_cluster_trust_bundle_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_cluster\_trust\_bundle\_spec module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_cluster_trust_bundle_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_counter.rst b/doc/source/kubernetes.test.test_v1beta1_counter.rst deleted file mode 100644 index f69068605e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_counter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_counter module -============================================= - -.. automodule:: kubernetes.test.test_v1beta1_counter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_counter_set.rst b/doc/source/kubernetes.test.test_v1beta1_counter_set.rst deleted file mode 100644 index 7a0a953342..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_counter_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_counter\_set module -================================================== - -.. automodule:: kubernetes.test.test_v1beta1_counter_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device.rst b/doc/source/kubernetes.test.test_v1beta1_device.rst deleted file mode 100644 index cf7ab930ed..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device module -============================================ - -.. automodule:: kubernetes.test.test_v1beta1_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_allocation_configuration.rst b/doc/source/kubernetes.test.test_v1beta1_device_allocation_configuration.rst deleted file mode 100644 index 7fac13c758..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_allocation_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_allocation\_configuration module -======================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_device_allocation_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_allocation_result.rst b/doc/source/kubernetes.test.test_v1beta1_device_allocation_result.rst deleted file mode 100644 index 8849f223e8..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_allocation\_result module -================================================================ - -.. automodule:: kubernetes.test.test_v1beta1_device_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_attribute.rst b/doc/source/kubernetes.test.test_v1beta1_device_attribute.rst deleted file mode 100644 index 5c3720b2ad..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_attribute module -======================================================= - -.. automodule:: kubernetes.test.test_v1beta1_device_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_capacity.rst b/doc/source/kubernetes.test.test_v1beta1_device_capacity.rst deleted file mode 100644 index 002592d306..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_capacity module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_claim.rst b/doc/source/kubernetes.test.test_v1beta1_device_claim.rst deleted file mode 100644 index d9d1d1a965..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_claim module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_claim_configuration.rst b/doc/source/kubernetes.test.test_v1beta1_device_claim_configuration.rst deleted file mode 100644 index 59db78abf2..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_claim_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_claim\_configuration module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_claim_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_class.rst b/doc/source/kubernetes.test.test_v1beta1_device_class.rst deleted file mode 100644 index 23fcf82a79..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_class module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_class_configuration.rst b/doc/source/kubernetes.test.test_v1beta1_device_class_configuration.rst deleted file mode 100644 index 66f66696c1..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_class_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_class\_configuration module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_class_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_class_list.rst b/doc/source/kubernetes.test.test_v1beta1_device_class_list.rst deleted file mode 100644 index bfa6b7ec52..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_class\_list module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta1_device_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_class_spec.rst b/doc/source/kubernetes.test.test_v1beta1_device_class_spec.rst deleted file mode 100644 index 0090ed3c6a..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_class\_spec module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta1_device_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_constraint.rst b/doc/source/kubernetes.test.test_v1beta1_device_constraint.rst deleted file mode 100644 index 155f48beba..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_constraint module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_counter_consumption.rst b/doc/source/kubernetes.test.test_v1beta1_device_counter_consumption.rst deleted file mode 100644 index 63975c549c..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_counter_consumption.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_counter\_consumption module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_counter_consumption - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_request.rst b/doc/source/kubernetes.test.test_v1beta1_device_request.rst deleted file mode 100644 index a78a89b568..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_request module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_request_allocation_result.rst b/doc/source/kubernetes.test.test_v1beta1_device_request_allocation_result.rst deleted file mode 100644 index 2b5220fd24..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_request_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_request\_allocation\_result module -========================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_device_request_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_selector.rst b/doc/source/kubernetes.test.test_v1beta1_device_selector.rst deleted file mode 100644 index 0b22d65ee1..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_selector module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_sub_request.rst b/doc/source/kubernetes.test.test_v1beta1_device_sub_request.rst deleted file mode 100644 index 5dcc63eb4f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_sub_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_sub\_request module -========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_sub_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_taint.rst b/doc/source/kubernetes.test.test_v1beta1_device_taint.rst deleted file mode 100644 index 4e1cc6613b..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_taint module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_device_toleration.rst b/doc/source/kubernetes.test.test_v1beta1_device_toleration.rst deleted file mode 100644 index 479df00157..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_device_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_device\_toleration module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta1_device_toleration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_ip_address.rst b/doc/source/kubernetes.test.test_v1beta1_ip_address.rst deleted file mode 100644 index 8ff96fc08f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_ip_address.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_ip\_address module -================================================= - -.. automodule:: kubernetes.test.test_v1beta1_ip_address - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_ip_address_list.rst b/doc/source/kubernetes.test.test_v1beta1_ip_address_list.rst deleted file mode 100644 index 8a11dad4ec..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_ip_address_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_ip\_address\_list module -======================================================= - -.. automodule:: kubernetes.test.test_v1beta1_ip_address_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_ip_address_spec.rst b/doc/source/kubernetes.test.test_v1beta1_ip_address_spec.rst deleted file mode 100644 index 047e66e965..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_ip_address_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_ip\_address\_spec module -======================================================= - -.. automodule:: kubernetes.test.test_v1beta1_ip_address_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_json_patch.rst b/doc/source/kubernetes.test.test_v1beta1_json_patch.rst deleted file mode 100644 index 029152cb56..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_json_patch.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_json\_patch module -================================================= - -.. automodule:: kubernetes.test.test_v1beta1_json_patch - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_lease_candidate.rst b/doc/source/kubernetes.test.test_v1beta1_lease_candidate.rst deleted file mode 100644 index 0386be4ebf..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_lease_candidate.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_lease\_candidate module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta1_lease_candidate - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_lease_candidate_list.rst b/doc/source/kubernetes.test.test_v1beta1_lease_candidate_list.rst deleted file mode 100644 index c86eb9a376..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_lease_candidate_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_lease\_candidate\_list module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta1_lease_candidate_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_lease_candidate_spec.rst b/doc/source/kubernetes.test.test_v1beta1_lease_candidate_spec.rst deleted file mode 100644 index f6e1a21c5d..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_lease_candidate_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_lease\_candidate\_spec module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta1_lease_candidate_spec - :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_mutating_admission_policy.rst b/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy.rst deleted file mode 100644 index ab85dcea02..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutating\_admission\_policy module -================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_mutating_admission_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding.rst b/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding.rst deleted file mode 100644 index c069f3be93..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutating\_admission\_policy\_binding module -========================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_mutating_admission_policy_binding - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding_list.rst b/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding_list.rst deleted file mode 100644 index 1372ccd804..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutating\_admission\_policy\_binding\_list module -================================================================================ - -.. automodule:: kubernetes.test.test_v1beta1_mutating_admission_policy_binding_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding_spec.rst b/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding_spec.rst deleted file mode 100644 index 84ed0576f7..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_binding_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutating\_admission\_policy\_binding\_spec module -================================================================================ - -.. automodule:: kubernetes.test.test_v1beta1_mutating_admission_policy_binding_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_list.rst b/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_list.rst deleted file mode 100644 index 66ca538971..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutating\_admission\_policy\_list module -======================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_mutating_admission_policy_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_spec.rst b/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_spec.rst deleted file mode 100644 index 85c49d998e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutating_admission_policy_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutating\_admission\_policy\_spec module -======================================================================= - -.. automodule:: kubernetes.test.test_v1beta1_mutating_admission_policy_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_mutation.rst b/doc/source/kubernetes.test.test_v1beta1_mutation.rst deleted file mode 100644 index 5abbfbb1bc..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_mutation.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_mutation module -============================================== - -.. automodule:: kubernetes.test.test_v1beta1_mutation - :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_network_device_data.rst b/doc/source/kubernetes.test.test_v1beta1_network_device_data.rst deleted file mode 100644 index b95d27b6bf..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_network_device_data.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_network\_device\_data module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_network_device_data - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_opaque_device_configuration.rst b/doc/source/kubernetes.test.test_v1beta1_opaque_device_configuration.rst deleted file mode 100644 index 845a7b69aa..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_opaque_device_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_opaque\_device\_configuration module -=================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_opaque_device_configuration - :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_parent_reference.rst b/doc/source/kubernetes.test.test_v1beta1_parent_reference.rst deleted file mode 100644 index 6952c79c1b..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_parent_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_parent\_reference module -======================================================= - -.. automodule:: kubernetes.test.test_v1beta1_parent_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim.rst deleted file mode 100644 index 092bd02e76..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_consumer_reference.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_consumer_reference.rst deleted file mode 100644 index 213d0869a7..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_consumer\_reference module -========================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_list.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_list.rst deleted file mode 100644 index f274d59854..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_list module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_spec.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_spec.rst deleted file mode 100644 index f02c1a9e88..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_spec module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_status.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_status.rst deleted file mode 100644 index 89b31b2055..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_status module -============================================================= - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_template.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_template.rst deleted file mode 100644 index 07f199cb77..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_template module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_template_list.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_template_list.rst deleted file mode 100644 index 5cb903905f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_template\_list module -===================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_claim_template_spec.rst b/doc/source/kubernetes.test.test_v1beta1_resource_claim_template_spec.rst deleted file mode 100644 index 86d8628e92..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_claim\_template\_spec module -===================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_claim_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_pool.rst b/doc/source/kubernetes.test.test_v1beta1_resource_pool.rst deleted file mode 100644 index 8a42213df0..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_pool.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_pool module -==================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_pool - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_slice.rst b/doc/source/kubernetes.test.test_v1beta1_resource_slice.rst deleted file mode 100644 index 4a00b94ad3..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_slice module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_slice_list.rst b/doc/source/kubernetes.test.test_v1beta1_resource_slice_list.rst deleted file mode 100644 index d1fcf1e597..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_slice\_list module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_resource_slice_spec.rst b/doc/source/kubernetes.test.test_v1beta1_resource_slice_spec.rst deleted file mode 100644 index a751295e27..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_resource_slice_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_resource\_slice\_spec module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_resource_slice_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_service_cidr.rst b/doc/source/kubernetes.test.test_v1beta1_service_cidr.rst deleted file mode 100644 index 9db34b0206..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_service_cidr.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_service\_cidr module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta1_service_cidr - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_service_cidr_list.rst b/doc/source/kubernetes.test.test_v1beta1_service_cidr_list.rst deleted file mode 100644 index ed7385868e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_service_cidr_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_service\_cidr\_list module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta1_service_cidr_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_service_cidr_spec.rst b/doc/source/kubernetes.test.test_v1beta1_service_cidr_spec.rst deleted file mode 100644 index f9eb6029cd..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_service_cidr_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_service\_cidr\_spec module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta1_service_cidr_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_service_cidr_status.rst b/doc/source/kubernetes.test.test_v1beta1_service_cidr_status.rst deleted file mode 100644 index 5afbc4e17c..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_service_cidr_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_service\_cidr\_status module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta1_service_cidr_status - :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_v1beta1_volume_attributes_class.rst b/doc/source/kubernetes.test.test_v1beta1_volume_attributes_class.rst deleted file mode 100644 index 3b767a924f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_volume_attributes_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_volume\_attributes\_class module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta1_volume_attributes_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta1_volume_attributes_class_list.rst b/doc/source/kubernetes.test.test_v1beta1_volume_attributes_class_list.rst deleted file mode 100644 index daf247ad1c..0000000000 --- a/doc/source/kubernetes.test.test_v1beta1_volume_attributes_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta1\_volume\_attributes\_class\_list module -===================================================================== - -.. automodule:: kubernetes.test.test_v1beta1_volume_attributes_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_allocated_device_status.rst b/doc/source/kubernetes.test.test_v1beta2_allocated_device_status.rst deleted file mode 100644 index 32788e37cc..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_allocated_device_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_allocated\_device\_status module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta2_allocated_device_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_allocation_result.rst b/doc/source/kubernetes.test.test_v1beta2_allocation_result.rst deleted file mode 100644 index 02bd734f94..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_allocation\_result module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta2_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_capacity_request_policy.rst b/doc/source/kubernetes.test.test_v1beta2_capacity_request_policy.rst deleted file mode 100644 index 9d39eebc98..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_capacity_request_policy.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_capacity\_request\_policy module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta2_capacity_request_policy - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_capacity_request_policy_range.rst b/doc/source/kubernetes.test.test_v1beta2_capacity_request_policy_range.rst deleted file mode 100644 index d806b511b6..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_capacity_request_policy_range.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_capacity\_request\_policy\_range module -====================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_capacity_request_policy_range - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_capacity_requirements.rst b/doc/source/kubernetes.test.test_v1beta2_capacity_requirements.rst deleted file mode 100644 index 593cef215c..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_capacity_requirements.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_capacity\_requirements module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta2_capacity_requirements - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_cel_device_selector.rst b/doc/source/kubernetes.test.test_v1beta2_cel_device_selector.rst deleted file mode 100644 index 088f57804e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_cel_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_cel\_device\_selector module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_cel_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_counter.rst b/doc/source/kubernetes.test.test_v1beta2_counter.rst deleted file mode 100644 index f604145720..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_counter.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_counter module -============================================= - -.. automodule:: kubernetes.test.test_v1beta2_counter - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_counter_set.rst b/doc/source/kubernetes.test.test_v1beta2_counter_set.rst deleted file mode 100644 index 8cd55ffdcb..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_counter_set.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_counter\_set module -================================================== - -.. automodule:: kubernetes.test.test_v1beta2_counter_set - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device.rst b/doc/source/kubernetes.test.test_v1beta2_device.rst deleted file mode 100644 index 1c3d46d1dc..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device module -============================================ - -.. automodule:: kubernetes.test.test_v1beta2_device - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_allocation_configuration.rst b/doc/source/kubernetes.test.test_v1beta2_device_allocation_configuration.rst deleted file mode 100644 index 2544ec9d1e..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_allocation_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_allocation\_configuration module -======================================================================= - -.. automodule:: kubernetes.test.test_v1beta2_device_allocation_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_allocation_result.rst b/doc/source/kubernetes.test.test_v1beta2_device_allocation_result.rst deleted file mode 100644 index e08b58739f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_allocation\_result module -================================================================ - -.. automodule:: kubernetes.test.test_v1beta2_device_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_attribute.rst b/doc/source/kubernetes.test.test_v1beta2_device_attribute.rst deleted file mode 100644 index ad827ee853..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_attribute.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_attribute module -======================================================= - -.. automodule:: kubernetes.test.test_v1beta2_device_attribute - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_capacity.rst b/doc/source/kubernetes.test.test_v1beta2_device_capacity.rst deleted file mode 100644 index 360d5c3bbd..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_capacity.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_capacity module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_capacity - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_claim.rst b/doc/source/kubernetes.test.test_v1beta2_device_claim.rst deleted file mode 100644 index 4c24423930..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_claim module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_claim_configuration.rst b/doc/source/kubernetes.test.test_v1beta2_device_claim_configuration.rst deleted file mode 100644 index ee679957d6..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_claim_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_claim\_configuration module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_claim_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_class.rst b/doc/source/kubernetes.test.test_v1beta2_device_class.rst deleted file mode 100644 index 958661b1ad..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_class.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_class module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_class - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_class_configuration.rst b/doc/source/kubernetes.test.test_v1beta2_device_class_configuration.rst deleted file mode 100644 index 1533da22fb..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_class_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_class\_configuration module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_class_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_class_list.rst b/doc/source/kubernetes.test.test_v1beta2_device_class_list.rst deleted file mode 100644 index 7872b5aae5..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_class_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_class\_list module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta2_device_class_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_class_spec.rst b/doc/source/kubernetes.test.test_v1beta2_device_class_spec.rst deleted file mode 100644 index e727cdffb3..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_class_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_class\_spec module -========================================================= - -.. automodule:: kubernetes.test.test_v1beta2_device_class_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_constraint.rst b/doc/source/kubernetes.test.test_v1beta2_device_constraint.rst deleted file mode 100644 index da73674a6b..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_constraint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_constraint module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_constraint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_counter_consumption.rst b/doc/source/kubernetes.test.test_v1beta2_device_counter_consumption.rst deleted file mode 100644 index 94519e10bb..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_counter_consumption.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_counter\_consumption module -================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_counter_consumption - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_request.rst b/doc/source/kubernetes.test.test_v1beta2_device_request.rst deleted file mode 100644 index ee26df47b8..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_request module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_request_allocation_result.rst b/doc/source/kubernetes.test.test_v1beta2_device_request_allocation_result.rst deleted file mode 100644 index c63065aff5..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_request_allocation_result.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_request\_allocation\_result module -========================================================================= - -.. automodule:: kubernetes.test.test_v1beta2_device_request_allocation_result - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_selector.rst b/doc/source/kubernetes.test.test_v1beta2_device_selector.rst deleted file mode 100644 index 7558b79a63..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_selector.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_selector module -====================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_selector - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_sub_request.rst b/doc/source/kubernetes.test.test_v1beta2_device_sub_request.rst deleted file mode 100644 index 732debca7f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_sub_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_sub\_request module -========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_sub_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_taint.rst b/doc/source/kubernetes.test.test_v1beta2_device_taint.rst deleted file mode 100644 index 65ae5dfc4a..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_taint.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_taint module -=================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_taint - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_device_toleration.rst b/doc/source/kubernetes.test.test_v1beta2_device_toleration.rst deleted file mode 100644 index df144aa3d2..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_device_toleration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_device\_toleration module -======================================================== - -.. automodule:: kubernetes.test.test_v1beta2_device_toleration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_exact_device_request.rst b/doc/source/kubernetes.test.test_v1beta2_exact_device_request.rst deleted file mode 100644 index 76f1b54417..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_exact_device_request.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_exact\_device\_request module -============================================================ - -.. automodule:: kubernetes.test.test_v1beta2_exact_device_request - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_network_device_data.rst b/doc/source/kubernetes.test.test_v1beta2_network_device_data.rst deleted file mode 100644 index 3f93a11eee..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_network_device_data.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_network\_device\_data module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_network_device_data - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_opaque_device_configuration.rst b/doc/source/kubernetes.test.test_v1beta2_opaque_device_configuration.rst deleted file mode 100644 index e8947ae2dd..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_opaque_device_configuration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_opaque\_device\_configuration module -=================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_opaque_device_configuration - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim.rst deleted file mode 100644 index 54779039eb..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_consumer_reference.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_consumer_reference.rst deleted file mode 100644 index 1910eaa6a9..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_consumer_reference.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_consumer\_reference module -========================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_consumer_reference - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_list.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_list.rst deleted file mode 100644 index 6864d85502..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_list module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_spec.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_spec.rst deleted file mode 100644 index 5f9d1493cd..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_spec module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_status.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_status.rst deleted file mode 100644 index c96bfb155f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_status.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_status module -============================================================= - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_status - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_template.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_template.rst deleted file mode 100644 index 5663e31e95..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_template.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_template module -=============================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_template - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_template_list.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_template_list.rst deleted file mode 100644 index 43b473976d..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_template_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_template\_list module -===================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_template_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_claim_template_spec.rst b/doc/source/kubernetes.test.test_v1beta2_resource_claim_template_spec.rst deleted file mode 100644 index 4fe63ab516..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_claim_template_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_claim\_template\_spec module -===================================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_claim_template_spec - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_pool.rst b/doc/source/kubernetes.test.test_v1beta2_resource_pool.rst deleted file mode 100644 index c5e976e6b6..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_pool.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_pool module -==================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_pool - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_slice.rst b/doc/source/kubernetes.test.test_v1beta2_resource_slice.rst deleted file mode 100644 index ac8e6a8f93..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_slice.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_slice module -===================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_slice - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_slice_list.rst b/doc/source/kubernetes.test.test_v1beta2_resource_slice_list.rst deleted file mode 100644 index 9030b7778f..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_slice_list.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_slice\_list module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_slice_list - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/source/kubernetes.test.test_v1beta2_resource_slice_spec.rst b/doc/source/kubernetes.test.test_v1beta2_resource_slice_spec.rst deleted file mode 100644 index 2297f1acdf..0000000000 --- a/doc/source/kubernetes.test.test_v1beta2_resource_slice_spec.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.test.test\_v1beta2\_resource\_slice\_spec module -=========================================================== - -.. automodule:: kubernetes.test.test_v1beta2_resource_slice_spec - :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.duration.rst b/doc/source/kubernetes.utils.duration.rst deleted file mode 100644 index 1607ac0b72..0000000000 --- a/doc/source/kubernetes.utils.duration.rst +++ /dev/null @@ -1,7 +0,0 @@ -kubernetes.utils.duration module -================================ - -.. automodule:: kubernetes.utils.duration - :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 d1c6b6c3a7..0000000000 --- a/doc/source/kubernetes.utils.rst +++ /dev/null @@ -1,20 +0,0 @@ -kubernetes.utils package -======================== - -Submodules ----------- - -.. toctree:: - :maxdepth: 4 - - kubernetes.utils.create_from_yaml - kubernetes.utils.duration - 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/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/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/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 7b5a7d230d..cedf7b5445 100644 --- a/kubernetes/.openapi-generator/swagger.json.sha256 +++ b/kubernetes/.openapi-generator/swagger.json.sha256 @@ -1 +1 @@ -41fe6392f32546ef9de874ed9da06d31cad0a1fcdd8bd9f161328c21a257b1fd \ No newline at end of file +51a2e56ab80c4ae78c7e06fae1600eb7e15cfefd37b4d47c778f52e9438fd54d \ No newline at end of file diff --git a/kubernetes/README.md b/kubernetes/README.md index 7467a3e21a..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.34 -- Package version: 34.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 @@ -308,32 +316,32 @@ Class | Method | HTTP request | Description *CertificatesV1Api* | [**replace_certificate_signing_request_approval**](docs/CertificatesV1Api.md#replace_certificate_signing_request_approval) | **PUT** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval | *CertificatesV1Api* | [**replace_certificate_signing_request_status**](docs/CertificatesV1Api.md#replace_certificate_signing_request_status) | **PUT** /apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status | *CertificatesV1alpha1Api* | [**create_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#create_cluster_trust_bundle) | **POST** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | -*CertificatesV1alpha1Api* | [**create_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#create_namespaced_pod_certificate_request) | **POST** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests | *CertificatesV1alpha1Api* | [**delete_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#delete_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | *CertificatesV1alpha1Api* | [**delete_collection_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#delete_collection_cluster_trust_bundle) | **DELETE** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | -*CertificatesV1alpha1Api* | [**delete_collection_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#delete_collection_namespaced_pod_certificate_request) | **DELETE** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests | -*CertificatesV1alpha1Api* | [**delete_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#delete_namespaced_pod_certificate_request) | **DELETE** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name} | *CertificatesV1alpha1Api* | [**get_api_resources**](docs/CertificatesV1alpha1Api.md#get_api_resources) | **GET** /apis/certificates.k8s.io/v1alpha1/ | *CertificatesV1alpha1Api* | [**list_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#list_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles | -*CertificatesV1alpha1Api* | [**list_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#list_namespaced_pod_certificate_request) | **GET** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests | -*CertificatesV1alpha1Api* | [**list_pod_certificate_request_for_all_namespaces**](docs/CertificatesV1alpha1Api.md#list_pod_certificate_request_for_all_namespaces) | **GET** /apis/certificates.k8s.io/v1alpha1/podcertificaterequests | *CertificatesV1alpha1Api* | [**patch_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#patch_cluster_trust_bundle) | **PATCH** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | -*CertificatesV1alpha1Api* | [**patch_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#patch_namespaced_pod_certificate_request) | **PATCH** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name} | -*CertificatesV1alpha1Api* | [**patch_namespaced_pod_certificate_request_status**](docs/CertificatesV1alpha1Api.md#patch_namespaced_pod_certificate_request_status) | **PATCH** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status | *CertificatesV1alpha1Api* | [**read_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#read_cluster_trust_bundle) | **GET** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | -*CertificatesV1alpha1Api* | [**read_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#read_namespaced_pod_certificate_request) | **GET** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name} | -*CertificatesV1alpha1Api* | [**read_namespaced_pod_certificate_request_status**](docs/CertificatesV1alpha1Api.md#read_namespaced_pod_certificate_request_status) | **GET** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status | *CertificatesV1alpha1Api* | [**replace_cluster_trust_bundle**](docs/CertificatesV1alpha1Api.md#replace_cluster_trust_bundle) | **PUT** /apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name} | -*CertificatesV1alpha1Api* | [**replace_namespaced_pod_certificate_request**](docs/CertificatesV1alpha1Api.md#replace_namespaced_pod_certificate_request) | **PUT** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name} | -*CertificatesV1alpha1Api* | [**replace_namespaced_pod_certificate_request_status**](docs/CertificatesV1alpha1Api.md#replace_namespaced_pod_certificate_request_status) | **PUT** /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status | *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 | @@ -812,8 +820,11 @@ Class | Method | HTTP request | Description *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 | @@ -891,6 +902,15 @@ 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 | @@ -939,14 +959,6 @@ Class | Method | HTTP request | Description *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 | *StorageV1Api* | [**replace_volume_attributes_class**](docs/StorageV1Api.md#replace_volume_attributes_class) | **PUT** /apis/storage.k8s.io/v1/volumeattributesclasses/{name} | -*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} | *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} | @@ -956,17 +968,17 @@ Class | Method | HTTP request | Description *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/ | @@ -1168,6 +1180,7 @@ Class | Method | HTTP request | Description - [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) @@ -1504,15 +1517,15 @@ Class | Method | HTTP request | Description - [V1WebhookConversion](docs/V1WebhookConversion.md) - [V1WeightedPodAffinityTerm](docs/V1WeightedPodAffinityTerm.md) - [V1WindowsSecurityContextOptions](docs/V1WindowsSecurityContextOptions.md) + - [V1WorkloadReference](docs/V1WorkloadReference.md) - [V1alpha1ApplyConfiguration](docs/V1alpha1ApplyConfiguration.md) - [V1alpha1ClusterTrustBundle](docs/V1alpha1ClusterTrustBundle.md) - [V1alpha1ClusterTrustBundleList](docs/V1alpha1ClusterTrustBundleList.md) - [V1alpha1ClusterTrustBundleSpec](docs/V1alpha1ClusterTrustBundleSpec.md) - - [V1alpha1GroupVersionResource](docs/V1alpha1GroupVersionResource.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) @@ -1523,31 +1536,26 @@ Class | Method | HTTP request | Description - [V1alpha1NamedRuleWithOperations](docs/V1alpha1NamedRuleWithOperations.md) - [V1alpha1ParamKind](docs/V1alpha1ParamKind.md) - [V1alpha1ParamRef](docs/V1alpha1ParamRef.md) - - [V1alpha1PodCertificateRequest](docs/V1alpha1PodCertificateRequest.md) - - [V1alpha1PodCertificateRequestList](docs/V1alpha1PodCertificateRequestList.md) - - [V1alpha1PodCertificateRequestSpec](docs/V1alpha1PodCertificateRequestSpec.md) - - [V1alpha1PodCertificateRequestStatus](docs/V1alpha1PodCertificateRequestStatus.md) + - [V1alpha1PodGroup](docs/V1alpha1PodGroup.md) + - [V1alpha1PodGroupPolicy](docs/V1alpha1PodGroupPolicy.md) - [V1alpha1ServerStorageVersion](docs/V1alpha1ServerStorageVersion.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) + - [V1alpha1TypedLocalObjectReference](docs/V1alpha1TypedLocalObjectReference.md) - [V1alpha1Variable](docs/V1alpha1Variable.md) - - [V1alpha1VolumeAttributesClass](docs/V1alpha1VolumeAttributesClass.md) - - [V1alpha1VolumeAttributesClassList](docs/V1alpha1VolumeAttributesClassList.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) - - [V1alpha3CELDeviceSelector](docs/V1alpha3CELDeviceSelector.md) - - [V1alpha3DeviceSelector](docs/V1alpha3DeviceSelector.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) @@ -1603,6 +1611,10 @@ Class | Method | HTTP request | Description - [V1beta1ParamKind](docs/V1beta1ParamKind.md) - [V1beta1ParamRef](docs/V1beta1ParamRef.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) @@ -1619,6 +1631,10 @@ Class | Method | HTTP request | Description - [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) - [V1beta1VolumeAttributesClass](docs/V1beta1VolumeAttributesClass.md) - [V1beta1VolumeAttributesClassList](docs/V1beta1VolumeAttributesClassList.md) @@ -1664,6 +1680,11 @@ Class | Method | HTTP request | Description - [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) @@ -1688,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 60676cd1f8..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__ = "34.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/kube_config.py b/kubernetes/base/config/kube_config.py index 0b000d314f..fc88f7f1fa 100644 --- a/kubernetes/base/config/kube_config.py +++ b/kubernetes/base/config/kube_config.py @@ -37,11 +37,6 @@ from .config_exception import ConfigException from .dateutil import UTC, format_rfc3339, parse_rfc3339 -try: - import adal -except ImportError: - pass - try: import google.auth import google.auth.transport.requests @@ -67,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) @@ -122,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 @@ -149,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): @@ -312,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 diff --git a/kubernetes/base/config/kube_config_test.py b/kubernetes/base/config/kube_config_test.py index ca512ad6cd..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) 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 10c6c1bcd5..44b6123325 100644 --- a/kubernetes/base/stream/ws_client.py +++ b/kubernetes/base/stream/ws_client.py @@ -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): @@ -536,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/watch/watch.py b/kubernetes/base/watch/watch.py index e8fe6c63e6..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 @@ -114,11 +114,18 @@ def unmarshal_event(self, data, return_type): try: 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': + + 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'): diff --git a/kubernetes/base/watch/watch_test.py b/kubernetes/base/watch/watch_test.py index 4907dd5433..07869095b6 100644 --- a/kubernetes/base/watch/watch_test.py +++ b/kubernetes/base/watch/watch_test.py @@ -12,20 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -import unittest - import os - import time - +import unittest from unittest.mock import Mock, call -from kubernetes import client,config +from kubernetes import client, config +from kubernetes.client import ApiException from .watch import Watch -from kubernetes.client import ApiException - class WatchTests(unittest.TestCase): def setUp(self): @@ -49,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 @@ -96,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 @@ -133,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 @@ -179,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 @@ -208,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 @@ -260,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 @@ -307,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): @@ -334,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 @@ -392,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): @@ -588,7 +597,7 @@ def test_pod_log_empty_lines(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' # # # test case with deserialize=True # w = Watch() diff --git a/kubernetes/client/__init__.py b/kubernetes/client/__init__.py index 238c018d30..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import -__version__ = "34.0.0+snapshot" +__version__ = "35.0.0+snapshot" # import apis into sdk package from kubernetes.client.api.well_known_api import WellKnownApi @@ -75,12 +75,12 @@ 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 @@ -90,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 @@ -288,6 +289,7 @@ 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 @@ -624,15 +626,15 @@ 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.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_group_version_resource import V1alpha1GroupVersionResource +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 @@ -643,31 +645,26 @@ 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_pod_certificate_request import V1alpha1PodCertificateRequest -from kubernetes.client.models.v1alpha1_pod_certificate_request_list import V1alpha1PodCertificateRequestList -from kubernetes.client.models.v1alpha1_pod_certificate_request_spec import V1alpha1PodCertificateRequestSpec -from kubernetes.client.models.v1alpha1_pod_certificate_request_status import V1alpha1PodCertificateRequestStatus +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_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_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.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_cel_device_selector import V1alpha3CELDeviceSelector -from kubernetes.client.models.v1alpha3_device_selector import V1alpha3DeviceSelector 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 @@ -723,6 +720,10 @@ from kubernetes.client.models.v1beta1_param_kind import V1beta1ParamKind from kubernetes.client.models.v1beta1_param_ref import V1beta1ParamRef 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 @@ -739,6 +740,10 @@ 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.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass from kubernetes.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList @@ -784,6 +789,11 @@ 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 @@ -808,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 7bc5ad8825..96fa9d53b9 100644 --- a/kubernetes/client/api/__init__.py +++ b/kubernetes/client/api/__init__.py @@ -61,10 +61,10 @@ 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 2a0b527cb2..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.34 + 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 abde655ea5..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_mutating_webhook_configuration_with_http_info(self, body, **kwargs): # 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 = {} @@ -288,6 +348,13 @@ def create_validating_admission_policy_with_http_info(self, body, **kwargs): # # 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 = {} @@ -422,6 +516,13 @@ def create_validating_admission_policy_binding_with_http_info(self, body, **kwar # 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 = {} @@ -556,6 +684,13 @@ def create_validating_webhook_configuration_with_http_info(self, body, **kwargs) # 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,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -617,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -674,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' ] ) @@ -692,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -736,6 +919,11 @@ def delete_collection_mutating_webhook_configuration_with_http_info(self, **kwar # 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, @@ -744,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 @@ -758,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -797,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -854,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' ] ) @@ -872,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -916,6 +1152,11 @@ def delete_collection_validating_admission_policy_with_http_info(self, **kwargs) # 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, @@ -924,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 @@ -938,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -977,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1034,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' ] ) @@ -1052,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1096,6 +1385,11 @@ def delete_collection_validating_admission_policy_binding_with_http_info(self, * # 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, @@ -1104,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 @@ -1118,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1157,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1214,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' ] ) @@ -1232,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1276,6 +1618,11 @@ def delete_collection_validating_webhook_configuration_with_http_info(self, **kw # 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, @@ -1284,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 @@ -1298,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1330,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1373,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' ] ) @@ -1386,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 = {} @@ -1397,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1425,6 +1805,12 @@ def delete_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # 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, @@ -1433,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 @@ -1447,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1479,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1522,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' ] ) @@ -1535,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 = {} @@ -1546,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1574,6 +1993,12 @@ def delete_validating_admission_policy_with_http_info(self, name, **kwargs): # # 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, @@ -1582,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 @@ -1596,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1628,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1671,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' ] ) @@ -1684,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 = {} @@ -1695,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1723,6 +2181,12 @@ def delete_validating_admission_policy_binding_with_http_info(self, name, **kwar # 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, @@ -1731,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 @@ -1745,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1777,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1820,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' ] ) @@ -1833,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 = {} @@ -1844,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1872,6 +2369,12 @@ def delete_validating_webhook_configuration_with_http_info(self, name, **kwargs) # 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, @@ -1880,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 @@ -1894,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 @@ -1918,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() @@ -1945,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' ] ) @@ -1964,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 = {} @@ -1977,6 +2498,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -1985,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 @@ -1999,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 @@ -2034,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() @@ -2083,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' ] ) @@ -2101,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 = {} @@ -2137,6 +2703,11 @@ def list_mutating_webhook_configuration_with_http_info(self, **kwargs): # noqa: # 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, @@ -2145,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 @@ -2159,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 @@ -2194,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() @@ -2243,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' ] ) @@ -2261,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 = {} @@ -2297,6 +2908,11 @@ def list_validating_admission_policy_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -2305,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 @@ -2319,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 @@ -2354,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() @@ -2403,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' ] ) @@ -2421,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 = {} @@ -2457,6 +3113,11 @@ def list_validating_admission_policy_binding_with_http_info(self, **kwargs): # # 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, @@ -2465,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 @@ -2479,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 @@ -2514,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() @@ -2563,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' ] ) @@ -2581,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 = {} @@ -2617,6 +3318,11 @@ def list_validating_webhook_configuration_with_http_info(self, **kwargs): # noq # 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, @@ -2625,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 @@ -2639,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 @@ -2670,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() @@ -2711,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' ] ) @@ -2724,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 = {} @@ -2739,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 = {} @@ -2763,12 +3499,22 @@ def patch_mutating_webhook_configuration_with_http_info(self, name, body, **kwar ['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', 'application/apply-patch+cbor']) # 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, @@ -2777,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 @@ -2791,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 @@ -2822,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() @@ -2863,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' ] ) @@ -2876,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 = {} @@ -2891,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 = {} @@ -2915,12 +3691,22 @@ def patch_validating_admission_policy_with_http_info(self, name, body, **kwargs) ['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', 'application/apply-patch+cbor']) # 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, @@ -2929,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 @@ -2943,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 @@ -2974,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() @@ -3015,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' ] ) @@ -3028,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 = {} @@ -3043,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 = {} @@ -3067,12 +3883,22 @@ def patch_validating_admission_policy_binding_with_http_info(self, name, body, * ['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', 'application/apply-patch+cbor']) # 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, @@ -3081,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 @@ -3095,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 @@ -3126,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() @@ -3167,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' ] ) @@ -3180,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 = {} @@ -3195,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 = {} @@ -3219,12 +4075,22 @@ def patch_validating_admission_policy_status_with_http_info(self, name, body, ** ['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', 'application/apply-patch+cbor']) # 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, @@ -3233,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 @@ -3247,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 @@ -3278,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() @@ -3319,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' ] ) @@ -3332,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 = {} @@ -3347,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 = {} @@ -3371,12 +4267,22 @@ def patch_validating_webhook_configuration_with_http_info(self, name, body, **kw ['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', 'application/apply-patch+cbor']) # 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, @@ -3385,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 @@ -3399,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 @@ -3425,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() @@ -3456,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' ] ) @@ -3469,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 = {} @@ -3480,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 = {} @@ -3496,6 +4423,11 @@ def read_mutating_webhook_configuration_with_http_info(self, name, **kwargs): # # 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, @@ -3504,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 @@ -3518,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 @@ -3544,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() @@ -3575,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' ] ) @@ -3588,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 = {} @@ -3599,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 = {} @@ -3615,6 +4568,11 @@ def read_validating_admission_policy_with_http_info(self, name, **kwargs): # no # 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, @@ -3623,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 @@ -3637,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 @@ -3663,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() @@ -3694,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' ] ) @@ -3707,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 = {} @@ -3718,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 = {} @@ -3734,6 +4713,11 @@ def read_validating_admission_policy_binding_with_http_info(self, name, **kwargs # 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, @@ -3742,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 @@ -3756,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 @@ -3782,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() @@ -3813,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' ] ) @@ -3826,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 = {} @@ -3837,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 = {} @@ -3853,6 +4858,11 @@ def read_validating_admission_policy_status_with_http_info(self, name, **kwargs) # 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, @@ -3861,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 @@ -3875,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 @@ -3901,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() @@ -3932,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' ] ) @@ -3945,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 = {} @@ -3956,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 = {} @@ -3972,6 +5003,11 @@ def read_validating_webhook_configuration_with_http_info(self, name, **kwargs): # 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, @@ -3980,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 @@ -3994,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 @@ -4024,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() @@ -4063,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' ] ) @@ -4076,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 = {} @@ -4091,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 = {} @@ -4115,6 +5179,12 @@ def replace_mutating_webhook_configuration_with_http_info(self, name, body, **kw # 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, @@ -4123,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 @@ -4137,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 @@ -4167,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() @@ -4206,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' ] ) @@ -4219,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 = {} @@ -4234,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 = {} @@ -4258,6 +5356,12 @@ def replace_validating_admission_policy_with_http_info(self, name, body, **kwarg # 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, @@ -4266,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 @@ -4280,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 @@ -4310,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() @@ -4349,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' ] ) @@ -4362,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 = {} @@ -4377,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 = {} @@ -4401,6 +5533,12 @@ def replace_validating_admission_policy_binding_with_http_info(self, name, body, # 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, @@ -4409,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 @@ -4423,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 @@ -4453,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() @@ -4492,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' ] ) @@ -4505,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 = {} @@ -4520,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 = {} @@ -4544,6 +5710,12 @@ def replace_validating_admission_policy_status_with_http_info(self, name, body, # 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, @@ -4552,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 @@ -4566,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 @@ -4596,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() @@ -4635,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' ] ) @@ -4648,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 = {} @@ -4663,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 = {} @@ -4687,6 +5887,12 @@ def replace_validating_webhook_configuration_with_http_info(self, name, body, ** # 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, @@ -4695,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 c95724be61..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_mutating_admission_policy(self, body, **kwargs): # 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_mutating_admission_policy(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1alpha1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # no 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_mutating_admission_policy_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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_mutating_admission_policy_with_http_info(self, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_mutating_admission_policy_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_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_mutating_admission_policy_with_http_info(self, body, **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 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if 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 = {} @@ -154,6 +180,13 @@ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # no # 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/mutatingadmissionpolicies', 'POST', path_params, @@ -162,13 +195,14 @@ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501 """create_mutating_admission_policy_binding # noqa: E501 @@ -176,25 +210,34 @@ def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E50 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_mutating_admission_policy_binding(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1alpha1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs 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_mutating_admission_policy_binding_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1alpha1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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_mutating_admission_policy_binding_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_mutating_admission_policy_binding_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_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_mutating_admission_policy_binding_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 = {} @@ -288,6 +348,13 @@ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs # 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/mutatingadmissionpolicybindings', 'POST', path_params, @@ -296,13 +363,14 @@ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, **kwargs): # noqa: E501 """delete_collection_mutating_admission_policy # noqa: E501 @@ -310,35 +378,54 @@ def delete_collection_mutating_admission_policy(self, **kwargs): # 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_admission_policy_with_http_info(**kwargs) # noqa: E501 @@ -349,37 +436,62 @@ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -406,7 +518,10 @@ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -424,36 +539,36 @@ def delete_collection_mutating_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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,6 +583,11 @@ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # 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/mutatingadmissionpolicies', 'DELETE', path_params, @@ -476,13 +596,14 @@ def delete_collection_mutating_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_mutating_admission_policy_binding(self, **kwargs): # noqa: E501 """delete_collection_mutating_admission_policy_binding # noqa: E501 @@ -490,35 +611,54 @@ def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 @@ -529,37 +669,62 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -586,7 +751,10 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -604,36 +772,36 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -648,6 +816,11 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k # 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/mutatingadmissionpolicybindings', 'DELETE', path_params, @@ -656,13 +829,14 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **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_mutating_admission_policy(self, name, **kwargs): # noqa: E501 """delete_mutating_admission_policy # noqa: E501 @@ -670,28 +844,40 @@ def delete_mutating_admission_policy(self, name, **kwargs): # 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_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 @@ -702,30 +888,48 @@ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # no 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_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 MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -745,7 +949,10 @@ def delete_mutating_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' ] ) @@ -758,8 +965,7 @@ def delete_mutating_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 `delete_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -769,20 +975,20 @@ def delete_mutating_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -797,6 +1003,12 @@ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # no # 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/mutatingadmissionpolicies/{name}', 'DELETE', path_params, @@ -805,13 +1017,14 @@ def delete_mutating_admission_policy_with_http_info(self, name, **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_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501 """delete_mutating_admission_policy_binding # noqa: E501 @@ -819,28 +1032,40 @@ def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E50 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_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -851,30 +1076,48 @@ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs 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_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 MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -894,7 +1137,10 @@ def delete_mutating_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' ] ) @@ -907,8 +1153,7 @@ def delete_mutating_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 `delete_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -918,20 +1163,20 @@ def delete_mutating_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -946,6 +1191,12 @@ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs # 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/mutatingadmissionpolicybindings/{name}', 'DELETE', path_params, @@ -954,13 +1205,14 @@ def delete_mutating_admission_policy_binding_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 @@ -968,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 @@ -992,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() @@ -1019,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' ] ) @@ -1038,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 = {} @@ -1051,6 +1320,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -1059,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_mutating_admission_policy(self, **kwargs): # noqa: E501 """list_mutating_admission_policy # noqa: E501 @@ -1073,31 +1348,46 @@ def list_mutating_admission_policy(self, **kwargs): # 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_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: V1alpha1MutatingAdmissionPolicyList + :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_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501 @@ -1108,33 +1398,54 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # 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_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(V1alpha1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1157,7 +1468,10 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1175,30 +1489,30 @@ def list_mutating_admission_policy_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 = {} @@ -1211,6 +1525,11 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # 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/mutatingadmissionpolicies', 'GET', path_params, @@ -1219,13 +1538,14 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, **kwargs): # noqa: E501 """list_mutating_admission_policy_binding # noqa: E501 @@ -1233,31 +1553,46 @@ def list_mutating_admission_policy_binding(self, **kwargs): # 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_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: V1alpha1MutatingAdmissionPolicyBindingList + :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_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 @@ -1268,33 +1603,54 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no 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_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(V1alpha1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1317,7 +1673,10 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1335,30 +1694,30 @@ def list_mutating_admission_policy_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 '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 = {} @@ -1371,6 +1730,11 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no # 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/mutatingadmissionpolicybindings', 'GET', path_params, @@ -1379,13 +1743,14 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicyBindingList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, name, body, **kwargs): # noqa: E501 """patch_mutating_admission_policy # noqa: E501 @@ -1393,27 +1758,38 @@ def patch_mutating_admission_policy(self, name, body, **kwargs): # 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_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (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: V1alpha1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1424,29 +1800,46 @@ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): 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_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 MutatingAdmissionPolicy (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(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1465,7 +1858,10 @@ def patch_mutating_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' ] ) @@ -1478,12 +1874,10 @@ def patch_mutating_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_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 + if self.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 = {} @@ -1493,18 +1887,18 @@ def patch_mutating_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 = {} @@ -1517,12 +1911,22 @@ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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/mutatingadmissionpolicies/{name}', 'PATCH', path_params, @@ -1531,13 +1935,14 @@ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 """patch_mutating_admission_policy_binding # noqa: E501 @@ -1545,27 +1950,38 @@ def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa 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_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 MutatingAdmissionPolicyBinding (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: V1alpha1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1576,29 +1992,46 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k 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_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 MutatingAdmissionPolicyBinding (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(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1617,7 +2050,10 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1630,12 +2066,10 @@ def patch_mutating_admission_policy_binding_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_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 + if self.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 = {} @@ -1645,18 +2079,18 @@ def patch_mutating_admission_policy_binding_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 = {} @@ -1669,12 +2103,22 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k ['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', 'application/apply-patch+cbor']) # 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: "V1alpha1MutatingAdmissionPolicyBinding", + 201: "V1alpha1MutatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1alpha1/mutatingadmissionpolicybindings/{name}', 'PATCH', path_params, @@ -1683,13 +2127,14 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, name, **kwargs): # noqa: E501 """read_mutating_admission_policy # noqa: E501 @@ -1697,22 +2142,28 @@ def read_mutating_admission_policy(self, name, **kwargs): # 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_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then 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: V1alpha1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 @@ -1723,24 +2174,36 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa 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_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 MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then 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(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1754,7 +2217,10 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1767,8 +2233,7 @@ def read_mutating_admission_policy_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_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -1778,10 +2243,10 @@ def read_mutating_admission_policy_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 = {} @@ -1794,6 +2259,11 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa # 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/mutatingadmissionpolicies/{name}', 'GET', path_params, @@ -1802,13 +2272,14 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, name, **kwargs): # noqa: E501 """read_mutating_admission_policy_binding # noqa: E501 @@ -1816,22 +2287,28 @@ def read_mutating_admission_policy_binding(self, name, **kwargs): # 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_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then 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: V1alpha1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -1842,24 +2319,36 @@ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): 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_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 MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then 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(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1873,7 +2362,10 @@ def read_mutating_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' ] ) @@ -1886,8 +2378,7 @@ def read_mutating_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_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -1897,10 +2388,10 @@ def read_mutating_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 = {} @@ -1913,6 +2404,11 @@ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # 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/mutatingadmissionpolicybindings/{name}', 'GET', path_params, @@ -1921,13 +2417,14 @@ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, name, body, **kwargs): # noqa: E501 """replace_mutating_admission_policy # noqa: E501 @@ -1935,26 +2432,36 @@ def replace_mutating_admission_policy(self, name, body, **kwargs): # 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_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (required) - :param V1alpha1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1alpha1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1965,28 +2472,44 @@ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs) 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_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 MutatingAdmissionPolicy (required) - :param V1alpha1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1alpha1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2004,7 +2527,10 @@ def replace_mutating_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' ] ) @@ -2017,12 +2543,10 @@ def replace_mutating_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 `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 + if self.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 = {} @@ -2032,16 +2556,16 @@ def replace_mutating_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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2056,6 +2580,12 @@ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs) # 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/mutatingadmissionpolicies/{name}', 'PUT', path_params, @@ -2064,13 +2594,14 @@ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 """replace_mutating_admission_policy_binding # noqa: E501 @@ -2078,26 +2609,36 @@ def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # no 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_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 MutatingAdmissionPolicyBinding (required) - :param V1alpha1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1alpha1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2108,28 +2649,44 @@ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, * 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_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 MutatingAdmissionPolicyBinding (required) - :param V1alpha1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1alpha1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2147,7 +2704,10 @@ def replace_mutating_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' ] ) @@ -2160,12 +2720,10 @@ def replace_mutating_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_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 + if self.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 = {} @@ -2175,16 +2733,16 @@ def replace_mutating_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 = {} @@ -2199,6 +2757,12 @@ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, * # 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/mutatingadmissionpolicybindings/{name}', 'PUT', path_params, @@ -2207,10 +2771,11 @@ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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 9b14fbb54c..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_mutating_admission_policy(self, body, **kwargs): # 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_mutating_admission_policy(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1beta1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(body, **kwargs) # noqa: E501 @@ -71,27 +80,42 @@ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # no 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_mutating_admission_policy_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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_mutating_admission_policy_with_http_info(self, body, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_mutating_admission_policy_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_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_mutating_admission_policy_with_http_info(self, body, **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 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if 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 = {} @@ -154,6 +180,13 @@ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # no # 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/mutatingadmissionpolicies', 'POST', path_params, @@ -162,13 +195,14 @@ def create_mutating_admission_policy_with_http_info(self, body, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E501 """create_mutating_admission_policy_binding # noqa: E501 @@ -176,25 +210,34 @@ def create_mutating_admission_policy_binding(self, body, **kwargs): # noqa: E50 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_mutating_admission_policy_binding(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1beta1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs 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_mutating_admission_policy_binding_with_http_info(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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_mutating_admission_policy_binding_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_mutating_admission_policy_binding_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_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_mutating_admission_policy_binding_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 = {} @@ -288,6 +348,13 @@ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs # 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/mutatingadmissionpolicybindings', 'POST', path_params, @@ -296,13 +363,14 @@ def create_mutating_admission_policy_binding_with_http_info(self, body, **kwargs body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, **kwargs): # noqa: E501 """delete_collection_mutating_admission_policy # noqa: E501 @@ -310,35 +378,54 @@ def delete_collection_mutating_admission_policy(self, **kwargs): # 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_admission_policy_with_http_info(**kwargs) # noqa: E501 @@ -349,37 +436,62 @@ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -406,7 +518,10 @@ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -424,36 +539,36 @@ def delete_collection_mutating_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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,6 +583,11 @@ def delete_collection_mutating_admission_policy_with_http_info(self, **kwargs): # 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/mutatingadmissionpolicies', 'DELETE', path_params, @@ -476,13 +596,14 @@ def delete_collection_mutating_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_mutating_admission_policy_binding(self, **kwargs): # noqa: E501 """delete_collection_mutating_admission_policy_binding # noqa: E501 @@ -490,35 +611,54 @@ def delete_collection_mutating_admission_policy_binding(self, **kwargs): # noqa 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 @@ -529,37 +669,62 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k 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_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -586,7 +751,10 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -604,36 +772,36 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -648,6 +816,11 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **k # 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/mutatingadmissionpolicybindings', 'DELETE', path_params, @@ -656,13 +829,14 @@ def delete_collection_mutating_admission_policy_binding_with_http_info(self, **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_mutating_admission_policy(self, name, **kwargs): # noqa: E501 """delete_mutating_admission_policy # noqa: E501 @@ -670,28 +844,40 @@ def delete_mutating_admission_policy(self, name, **kwargs): # 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_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 @@ -702,30 +888,48 @@ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # no 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_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 MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -745,7 +949,10 @@ def delete_mutating_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' ] ) @@ -758,8 +965,7 @@ def delete_mutating_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 `delete_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -769,20 +975,20 @@ def delete_mutating_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -797,6 +1003,12 @@ def delete_mutating_admission_policy_with_http_info(self, name, **kwargs): # no # 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/mutatingadmissionpolicies/{name}', 'DELETE', path_params, @@ -805,13 +1017,14 @@ def delete_mutating_admission_policy_with_http_info(self, name, **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_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E501 """delete_mutating_admission_policy_binding # noqa: E501 @@ -819,28 +1032,40 @@ def delete_mutating_admission_policy_binding(self, name, **kwargs): # noqa: E50 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_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -851,30 +1076,48 @@ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs 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_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 MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -894,7 +1137,10 @@ def delete_mutating_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' ] ) @@ -907,8 +1153,7 @@ def delete_mutating_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 `delete_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -918,20 +1163,20 @@ def delete_mutating_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -946,6 +1191,12 @@ def delete_mutating_admission_policy_binding_with_http_info(self, name, **kwargs # 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/mutatingadmissionpolicybindings/{name}', 'DELETE', path_params, @@ -954,13 +1205,14 @@ def delete_mutating_admission_policy_binding_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 @@ -968,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 @@ -992,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() @@ -1019,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' ] ) @@ -1038,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 = {} @@ -1051,6 +1320,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -1059,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_mutating_admission_policy(self, **kwargs): # noqa: E501 """list_mutating_admission_policy # noqa: E501 @@ -1073,31 +1348,46 @@ def list_mutating_admission_policy(self, **kwargs): # 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_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: V1beta1MutatingAdmissionPolicyList + :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_mutating_admission_policy_with_http_info(**kwargs) # noqa: E501 @@ -1108,33 +1398,54 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # 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_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(V1beta1MutatingAdmissionPolicyList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1157,7 +1468,10 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1175,30 +1489,30 @@ def list_mutating_admission_policy_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 = {} @@ -1211,6 +1525,11 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # 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/mutatingadmissionpolicies', 'GET', path_params, @@ -1219,13 +1538,14 @@ def list_mutating_admission_policy_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicyList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, **kwargs): # noqa: E501 """list_mutating_admission_policy_binding # noqa: E501 @@ -1233,31 +1553,46 @@ def list_mutating_admission_policy_binding(self, **kwargs): # 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_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: V1beta1MutatingAdmissionPolicyBindingList + :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_mutating_admission_policy_binding_with_http_info(**kwargs) # noqa: E501 @@ -1268,33 +1603,54 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no 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_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(V1beta1MutatingAdmissionPolicyBindingList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1317,7 +1673,10 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1335,30 +1694,30 @@ def list_mutating_admission_policy_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 '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 = {} @@ -1371,6 +1730,11 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no # 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/mutatingadmissionpolicybindings', 'GET', path_params, @@ -1379,13 +1743,14 @@ def list_mutating_admission_policy_binding_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicyBindingList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, name, body, **kwargs): # noqa: E501 """patch_mutating_admission_policy # noqa: E501 @@ -1393,27 +1758,38 @@ def patch_mutating_admission_policy(self, name, body, **kwargs): # 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_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (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: V1beta1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1424,29 +1800,46 @@ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): 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_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 MutatingAdmissionPolicy (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(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1465,7 +1858,10 @@ def patch_mutating_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' ] ) @@ -1478,12 +1874,10 @@ def patch_mutating_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_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 + if self.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 = {} @@ -1493,18 +1887,18 @@ def patch_mutating_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 = {} @@ -1517,12 +1911,22 @@ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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/mutatingadmissionpolicies/{name}', 'PATCH', path_params, @@ -1531,13 +1935,14 @@ def patch_mutating_admission_policy_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 """patch_mutating_admission_policy_binding # noqa: E501 @@ -1545,27 +1950,38 @@ def patch_mutating_admission_policy_binding(self, name, body, **kwargs): # noqa 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_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 MutatingAdmissionPolicyBinding (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: V1beta1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1576,29 +1992,46 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k 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_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 MutatingAdmissionPolicyBinding (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(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1617,7 +2050,10 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1630,12 +2066,10 @@ def patch_mutating_admission_policy_binding_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_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 + if self.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 = {} @@ -1645,18 +2079,18 @@ def patch_mutating_admission_policy_binding_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 = {} @@ -1669,12 +2103,22 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k ['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', 'application/apply-patch+cbor']) # 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: "V1beta1MutatingAdmissionPolicyBinding", + 201: "V1beta1MutatingAdmissionPolicyBinding", + 401: None, + } + return self.api_client.call_api( '/apis/admissionregistration.k8s.io/v1beta1/mutatingadmissionpolicybindings/{name}', 'PATCH', path_params, @@ -1683,13 +2127,14 @@ def patch_mutating_admission_policy_binding_with_http_info(self, name, body, **k body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, name, **kwargs): # noqa: E501 """read_mutating_admission_policy # noqa: E501 @@ -1697,22 +2142,28 @@ def read_mutating_admission_policy(self, name, **kwargs): # 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_mutating_admission_policy(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then 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: V1beta1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(name, **kwargs) # noqa: E501 @@ -1723,24 +2174,36 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa 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_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 MutatingAdmissionPolicy (required) - :param str pretty: If 'true', then 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(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1754,7 +2217,10 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1767,8 +2233,7 @@ def read_mutating_admission_policy_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_mutating_admission_policy`") # noqa: E501 collection_formats = {} @@ -1778,10 +2243,10 @@ def read_mutating_admission_policy_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 = {} @@ -1794,6 +2259,11 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa # 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/mutatingadmissionpolicies/{name}', 'GET', path_params, @@ -1802,13 +2272,14 @@ def read_mutating_admission_policy_with_http_info(self, name, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, name, **kwargs): # noqa: E501 """read_mutating_admission_policy_binding # noqa: E501 @@ -1816,22 +2287,28 @@ def read_mutating_admission_policy_binding(self, name, **kwargs): # 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_mutating_admission_policy_binding(name, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then 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: V1beta1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(name, **kwargs) # noqa: E501 @@ -1842,24 +2319,36 @@ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): 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_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 MutatingAdmissionPolicyBinding (required) - :param str pretty: If 'true', then 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(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1873,7 +2362,10 @@ def read_mutating_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' ] ) @@ -1886,8 +2378,7 @@ def read_mutating_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_mutating_admission_policy_binding`") # noqa: E501 collection_formats = {} @@ -1897,10 +2388,10 @@ def read_mutating_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 = {} @@ -1913,6 +2404,11 @@ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): # 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/mutatingadmissionpolicybindings/{name}', 'GET', path_params, @@ -1921,13 +2417,14 @@ def read_mutating_admission_policy_binding_with_http_info(self, name, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy(self, name, body, **kwargs): # noqa: E501 """replace_mutating_admission_policy # noqa: E501 @@ -1935,26 +2432,36 @@ def replace_mutating_admission_policy(self, name, body, **kwargs): # 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_mutating_admission_policy(name, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the MutatingAdmissionPolicy (required) - :param V1beta1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1beta1MutatingAdmissionPolicy + :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_mutating_admission_policy_with_http_info(name, body, **kwargs) # noqa: E501 @@ -1965,28 +2472,44 @@ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs) 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_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 MutatingAdmissionPolicy (required) - :param V1beta1MutatingAdmissionPolicy body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1beta1MutatingAdmissionPolicy, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2004,7 +2527,10 @@ def replace_mutating_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' ] ) @@ -2017,12 +2543,10 @@ def replace_mutating_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 `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 + if self.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 = {} @@ -2032,16 +2556,16 @@ def replace_mutating_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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2056,6 +2580,12 @@ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs) # 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/mutatingadmissionpolicies/{name}', 'PUT', path_params, @@ -2064,13 +2594,14 @@ def replace_mutating_admission_policy_with_http_info(self, name, body, **kwargs) body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicy', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_admission_policy_binding(self, name, body, **kwargs): # noqa: E501 """replace_mutating_admission_policy_binding # noqa: E501 @@ -2078,26 +2609,36 @@ def replace_mutating_admission_policy_binding(self, name, body, **kwargs): # no 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_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 MutatingAdmissionPolicyBinding (required) - :param V1beta1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1beta1MutatingAdmissionPolicyBinding + :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_mutating_admission_policy_binding_with_http_info(name, body, **kwargs) # noqa: E501 @@ -2108,28 +2649,44 @@ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, * 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_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 MutatingAdmissionPolicyBinding (required) - :param V1beta1MutatingAdmissionPolicyBinding body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1beta1MutatingAdmissionPolicyBinding, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2147,7 +2704,10 @@ def replace_mutating_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' ] ) @@ -2160,12 +2720,10 @@ def replace_mutating_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_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 + if self.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 = {} @@ -2175,16 +2733,16 @@ def replace_mutating_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 = {} @@ -2199,6 +2757,12 @@ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, * # 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/mutatingadmissionpolicybindings/{name}', 'PUT', path_params, @@ -2207,10 +2771,11 @@ def replace_mutating_admission_policy_binding_with_http_info(self, name, body, * body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1MutatingAdmissionPolicyBinding', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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 a2de1de5af..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.34 + 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 f3c801159f..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_custom_resource_definition_with_http_info(self, body, **kwargs): # n # 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,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -215,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -272,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' ] ) @@ -290,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -334,6 +415,11 @@ def delete_collection_custom_resource_definition_with_http_info(self, **kwargs): # 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, @@ -342,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 @@ -356,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -388,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -431,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' ] ) @@ -444,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 = {} @@ -455,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -483,6 +602,12 @@ def delete_custom_resource_definition_with_http_info(self, name, **kwargs): # n # 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, @@ -491,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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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 @@ -610,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 @@ -645,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() @@ -694,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' ] ) @@ -712,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 = {} @@ -748,6 +936,11 @@ def list_custom_resource_definition_with_http_info(self, **kwargs): # noqa: E50 # 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, @@ -756,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 @@ -770,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 @@ -801,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() @@ -842,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' ] ) @@ -855,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 = {} @@ -870,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 = {} @@ -894,12 +1117,22 @@ def patch_custom_resource_definition_with_http_info(self, name, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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, @@ -908,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 @@ -922,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 @@ -953,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() @@ -994,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' ] ) @@ -1007,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 = {} @@ -1022,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 = {} @@ -1046,12 +1309,22 @@ def patch_custom_resource_definition_status_with_http_info(self, name, body, **k ['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', 'application/apply-patch+cbor']) # 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, @@ -1060,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 @@ -1074,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 @@ -1100,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() @@ -1131,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' ] ) @@ -1144,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 = {} @@ -1155,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 = {} @@ -1171,6 +1465,11 @@ def read_custom_resource_definition_with_http_info(self, name, **kwargs): # noq # 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, @@ -1179,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 @@ -1193,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 @@ -1219,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() @@ -1250,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' ] ) @@ -1263,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 = {} @@ -1274,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 = {} @@ -1290,6 +1610,11 @@ def read_custom_resource_definition_status_with_http_info(self, name, **kwargs): # 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, @@ -1298,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 @@ -1312,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 @@ -1342,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() @@ -1381,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' ] ) @@ -1394,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 = {} @@ -1409,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 = {} @@ -1433,6 +1786,12 @@ def replace_custom_resource_definition_with_http_info(self, name, body, **kwargs # 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, @@ -1441,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 @@ -1455,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 @@ -1485,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() @@ -1524,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' ] ) @@ -1537,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 = {} @@ -1552,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 = {} @@ -1576,6 +1963,12 @@ def replace_custom_resource_definition_status_with_http_info(self, name, body, * # 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, @@ -1584,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 cf5f7a2e23..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.34 + 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 1ac27e9974..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_api_service_with_http_info(self, body, **kwargs): # 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,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -208,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -251,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' ] ) @@ -264,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 = {} @@ -275,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -303,6 +369,12 @@ def delete_api_service_with_http_info(self, name, **kwargs): # 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, @@ -311,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 @@ -325,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -364,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -421,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' ] ) @@ -439,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -483,6 +603,11 @@ def delete_collection_api_service_with_http_info(self, **kwargs): # 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, @@ -491,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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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 @@ -610,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 @@ -645,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() @@ -694,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' ] ) @@ -712,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 = {} @@ -748,6 +936,11 @@ def list_api_service_with_http_info(self, **kwargs): # 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, @@ -756,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 @@ -770,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 @@ -801,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() @@ -842,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' ] ) @@ -855,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 = {} @@ -870,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 = {} @@ -894,12 +1117,22 @@ def patch_api_service_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -908,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 @@ -922,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 @@ -953,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() @@ -994,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' ] ) @@ -1007,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 = {} @@ -1022,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 = {} @@ -1046,12 +1309,22 @@ def patch_api_service_status_with_http_info(self, name, body, **kwargs): # noqa ['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', 'application/apply-patch+cbor']) # 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, @@ -1060,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 @@ -1074,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 @@ -1100,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() @@ -1131,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' ] ) @@ -1144,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 = {} @@ -1155,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 = {} @@ -1171,6 +1465,11 @@ def read_api_service_with_http_info(self, name, **kwargs): # 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, @@ -1179,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 @@ -1193,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 @@ -1219,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() @@ -1250,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' ] ) @@ -1263,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 = {} @@ -1274,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 = {} @@ -1290,6 +1610,11 @@ def read_api_service_status_with_http_info(self, name, **kwargs): # 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, @@ -1298,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 @@ -1312,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 @@ -1342,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() @@ -1381,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' ] ) @@ -1394,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 = {} @@ -1409,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 = {} @@ -1433,6 +1786,12 @@ def replace_api_service_with_http_info(self, name, body, **kwargs): # noqa: E50 # 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, @@ -1441,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 @@ -1455,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 @@ -1485,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() @@ -1524,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' ] ) @@ -1537,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 = {} @@ -1552,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 = {} @@ -1576,6 +1963,12 @@ def replace_api_service_status_with_http_info(self, name, body, **kwargs): # no # 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, @@ -1584,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 24f6de1741..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.34 + 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 1da5f3314d..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.34 + 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 93e332b133..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_controller_revision_with_http_info(self, namespace, body, # 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 = {} @@ -306,6 +368,13 @@ def create_namespaced_daemon_set_with_http_info(self, namespace, body, **kwargs) # 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 = {} @@ -449,6 +546,13 @@ def create_namespaced_deployment_with_http_info(self, namespace, body, **kwargs) # 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 = {} @@ -592,6 +724,13 @@ def create_namespaced_replica_set_with_http_info(self, namespace, body, **kwargs # 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 = {} @@ -735,6 +902,13 @@ def create_namespaced_stateful_set_with_http_info(self, namespace, body, **kwarg # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -797,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -856,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' ] ) @@ -869,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 = {} @@ -880,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -924,6 +1147,11 @@ def delete_collection_namespaced_controller_revision_with_http_info(self, namesp # 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, @@ -932,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 @@ -946,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -986,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1045,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' ] ) @@ -1058,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 = {} @@ -1069,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1113,6 +1390,11 @@ def delete_collection_namespaced_daemon_set_with_http_info(self, namespace, **kw # 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, @@ -1121,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 @@ -1135,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1175,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1234,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' ] ) @@ -1247,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 = {} @@ -1258,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1302,6 +1633,11 @@ def delete_collection_namespaced_deployment_with_http_info(self, namespace, **kw # 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, @@ -1310,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 @@ -1324,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1364,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1423,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' ] ) @@ -1436,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 = {} @@ -1447,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1491,6 +1876,11 @@ def delete_collection_namespaced_replica_set_with_http_info(self, namespace, **k # 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, @@ -1499,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 @@ -1513,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1553,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1612,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' ] ) @@ -1625,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 = {} @@ -1636,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1680,6 +2119,11 @@ def delete_collection_namespaced_stateful_set_with_http_info(self, namespace, ** # 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, @@ -1688,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 @@ -1702,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1735,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1780,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' ] ) @@ -1793,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 = {} @@ -1810,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1838,6 +2316,12 @@ def delete_namespaced_controller_revision_with_http_info(self, name, namespace, # 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, @@ -1846,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 @@ -1860,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1893,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1938,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' ] ) @@ -1951,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 = {} @@ -1968,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1996,6 +2514,12 @@ def delete_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs) # 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, @@ -2004,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 @@ -2018,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -2051,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -2096,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' ] ) @@ -2109,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 = {} @@ -2126,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2154,6 +2712,12 @@ def delete_namespaced_deployment_with_http_info(self, name, namespace, **kwargs) # 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, @@ -2162,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 @@ -2176,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -2209,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -2254,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' ] ) @@ -2267,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 = {} @@ -2284,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2312,6 +2910,12 @@ def delete_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs # 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, @@ -2320,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 @@ -2334,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -2367,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -2412,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' ] ) @@ -2425,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 = {} @@ -2442,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2470,6 +3108,12 @@ def delete_namespaced_stateful_set_with_http_info(self, name, namespace, **kwarg # 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, @@ -2478,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 @@ -2492,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 @@ -2516,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() @@ -2543,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' ] ) @@ -2562,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 = {} @@ -2575,6 +3237,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2583,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 @@ -2597,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 @@ -2632,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() @@ -2681,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' ] ) @@ -2699,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 = {} @@ -2735,6 +3442,11 @@ def list_controller_revision_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -2743,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 @@ -2757,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 @@ -2792,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() @@ -2841,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' ] ) @@ -2859,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 = {} @@ -2895,6 +3647,11 @@ def list_daemon_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: # 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, @@ -2903,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 @@ -2917,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 @@ -2952,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() @@ -3001,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' ] ) @@ -3019,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 = {} @@ -3055,6 +3852,11 @@ def list_deployment_for_all_namespaces_with_http_info(self, **kwargs): # noqa: # 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, @@ -3063,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 @@ -3077,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 @@ -3113,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() @@ -3164,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' ] ) @@ -3177,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 = {} @@ -3188,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 = {} @@ -3224,6 +4067,11 @@ def list_namespaced_controller_revision_with_http_info(self, namespace, **kwargs # 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, @@ -3232,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 @@ -3246,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 @@ -3282,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() @@ -3333,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' ] ) @@ -3346,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 = {} @@ -3357,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 = {} @@ -3393,6 +4282,11 @@ def list_namespaced_daemon_set_with_http_info(self, namespace, **kwargs): # noq # 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, @@ -3401,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 @@ -3415,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 @@ -3451,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() @@ -3502,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' ] ) @@ -3515,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 = {} @@ -3526,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 = {} @@ -3562,6 +4497,11 @@ def list_namespaced_deployment_with_http_info(self, namespace, **kwargs): # noq # 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, @@ -3570,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 @@ -3584,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 @@ -3620,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() @@ -3671,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' ] ) @@ -3684,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 = {} @@ -3695,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 = {} @@ -3731,6 +4712,11 @@ def list_namespaced_replica_set_with_http_info(self, namespace, **kwargs): # no # 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, @@ -3739,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 @@ -3753,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 @@ -3789,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() @@ -3840,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' ] ) @@ -3853,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 = {} @@ -3864,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 = {} @@ -3900,6 +4927,11 @@ def list_namespaced_stateful_set_with_http_info(self, namespace, **kwargs): # n # 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, @@ -3908,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 @@ -3922,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 @@ -3957,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() @@ -4006,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' ] ) @@ -4024,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 = {} @@ -4060,6 +5132,11 @@ def list_replica_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa: # 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, @@ -4068,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 @@ -4082,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 @@ -4117,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() @@ -4166,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' ] ) @@ -4184,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 = {} @@ -4220,6 +5337,11 @@ def list_stateful_set_for_all_namespaces_with_http_info(self, **kwargs): # noqa # 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, @@ -4228,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 @@ -4242,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 @@ -4274,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() @@ -4317,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' ] ) @@ -4330,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 = {} @@ -4351,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 = {} @@ -4375,12 +5528,22 @@ def patch_namespaced_controller_revision_with_http_info(self, name, namespace, b ['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', 'application/apply-patch+cbor']) # 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, @@ -4389,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 @@ -4403,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 @@ -4435,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() @@ -4478,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' ] ) @@ -4491,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 = {} @@ -4512,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 = {} @@ -4536,12 +5730,22 @@ def patch_namespaced_daemon_set_with_http_info(self, name, namespace, body, **kw ['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', 'application/apply-patch+cbor']) # 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, @@ -4550,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 @@ -4564,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 @@ -4596,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() @@ -4639,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' ] ) @@ -4652,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 = {} @@ -4673,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 = {} @@ -4697,12 +5932,22 @@ def patch_namespaced_daemon_set_status_with_http_info(self, name, namespace, bod ['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', 'application/apply-patch+cbor']) # 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, @@ -4711,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 @@ -4725,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 @@ -4757,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() @@ -4800,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' ] ) @@ -4813,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 = {} @@ -4834,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 = {} @@ -4858,12 +6134,22 @@ def patch_namespaced_deployment_with_http_info(self, name, namespace, body, **kw ['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', 'application/apply-patch+cbor']) # 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, @@ -4872,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 @@ -4886,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 @@ -4918,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() @@ -4961,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' ] ) @@ -4974,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 = {} @@ -4995,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 = {} @@ -5019,12 +6336,22 @@ def patch_namespaced_deployment_scale_with_http_info(self, name, namespace, body ['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', 'application/apply-patch+cbor']) # 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, @@ -5033,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 @@ -5047,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 @@ -5079,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() @@ -5122,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' ] ) @@ -5135,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 = {} @@ -5156,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 = {} @@ -5180,12 +6538,22 @@ def patch_namespaced_deployment_status_with_http_info(self, name, namespace, bod ['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', 'application/apply-patch+cbor']) # 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, @@ -5194,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 @@ -5208,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 @@ -5240,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() @@ -5283,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' ] ) @@ -5296,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 = {} @@ -5317,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 = {} @@ -5341,12 +6740,22 @@ def patch_namespaced_replica_set_with_http_info(self, name, namespace, body, **k ['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', 'application/apply-patch+cbor']) # 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, @@ -5355,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 @@ -5369,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 @@ -5401,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() @@ -5444,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' ] ) @@ -5457,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 = {} @@ -5478,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 = {} @@ -5502,12 +6942,22 @@ def patch_namespaced_replica_set_scale_with_http_info(self, name, namespace, bod ['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', 'application/apply-patch+cbor']) # 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, @@ -5516,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 @@ -5530,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 @@ -5562,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() @@ -5605,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' ] ) @@ -5618,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 = {} @@ -5639,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 = {} @@ -5663,12 +7144,22 @@ def patch_namespaced_replica_set_status_with_http_info(self, name, namespace, bo ['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', 'application/apply-patch+cbor']) # 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, @@ -5677,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 @@ -5691,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 @@ -5723,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() @@ -5766,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' ] ) @@ -5779,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 = {} @@ -5800,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 = {} @@ -5824,12 +7346,22 @@ def patch_namespaced_stateful_set_with_http_info(self, name, namespace, body, ** ['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', 'application/apply-patch+cbor']) # 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, @@ -5838,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 @@ -5852,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 @@ -5884,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() @@ -5927,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' ] ) @@ -5940,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 = {} @@ -5961,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 = {} @@ -5985,12 +7548,22 @@ def patch_namespaced_stateful_set_scale_with_http_info(self, name, namespace, bo ['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', 'application/apply-patch+cbor']) # 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, @@ -5999,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 @@ -6013,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 @@ -6045,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() @@ -6088,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' ] ) @@ -6101,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 = {} @@ -6122,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 = {} @@ -6146,12 +7750,22 @@ def patch_namespaced_stateful_set_status_with_http_info(self, name, namespace, b ['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', 'application/apply-patch+cbor']) # 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, @@ -6160,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 @@ -6174,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 @@ -6201,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() @@ -6234,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' ] ) @@ -6247,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 = {} @@ -6264,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 = {} @@ -6280,6 +7916,11 @@ def read_namespaced_controller_revision_with_http_info(self, name, namespace, ** # 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, @@ -6288,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 @@ -6302,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 @@ -6329,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() @@ -6362,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' ] ) @@ -6375,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 = {} @@ -6392,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 = {} @@ -6408,6 +8071,11 @@ def read_namespaced_daemon_set_with_http_info(self, name, namespace, **kwargs): # 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, @@ -6416,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 @@ -6430,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 @@ -6457,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() @@ -6490,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' ] ) @@ -6503,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 = {} @@ -6520,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 = {} @@ -6536,6 +8226,11 @@ def read_namespaced_daemon_set_status_with_http_info(self, name, namespace, **kw # 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, @@ -6544,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 @@ -6558,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 @@ -6585,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() @@ -6618,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' ] ) @@ -6631,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 = {} @@ -6648,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 = {} @@ -6664,6 +8381,11 @@ def read_namespaced_deployment_with_http_info(self, name, namespace, **kwargs): # 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, @@ -6672,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 @@ -6686,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 @@ -6713,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() @@ -6746,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' ] ) @@ -6759,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 = {} @@ -6776,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 = {} @@ -6792,6 +8536,11 @@ def read_namespaced_deployment_scale_with_http_info(self, name, namespace, **kwa # 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, @@ -6800,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 @@ -6814,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 @@ -6841,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() @@ -6874,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' ] ) @@ -6887,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 = {} @@ -6904,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 = {} @@ -6920,6 +8691,11 @@ def read_namespaced_deployment_status_with_http_info(self, name, namespace, **kw # 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, @@ -6928,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 @@ -6942,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 @@ -6969,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() @@ -7002,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' ] ) @@ -7015,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 = {} @@ -7032,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 = {} @@ -7048,6 +8846,11 @@ def read_namespaced_replica_set_with_http_info(self, name, namespace, **kwargs): # 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, @@ -7056,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 @@ -7070,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 @@ -7097,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() @@ -7130,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' ] ) @@ -7143,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 = {} @@ -7160,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 = {} @@ -7176,6 +9001,11 @@ def read_namespaced_replica_set_scale_with_http_info(self, name, namespace, **kw # 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, @@ -7184,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 @@ -7198,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 @@ -7225,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() @@ -7258,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' ] ) @@ -7271,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 = {} @@ -7288,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 = {} @@ -7304,6 +9156,11 @@ def read_namespaced_replica_set_status_with_http_info(self, name, namespace, **k # 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, @@ -7312,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 @@ -7326,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 @@ -7353,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() @@ -7386,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' ] ) @@ -7399,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 = {} @@ -7416,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 = {} @@ -7432,6 +9311,11 @@ def read_namespaced_stateful_set_with_http_info(self, name, namespace, **kwargs) # 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, @@ -7440,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 @@ -7454,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 @@ -7481,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() @@ -7514,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' ] ) @@ -7527,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 = {} @@ -7544,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 = {} @@ -7560,6 +9466,11 @@ def read_namespaced_stateful_set_scale_with_http_info(self, name, namespace, **k # 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, @@ -7568,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 @@ -7582,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 @@ -7609,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() @@ -7642,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' ] ) @@ -7655,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 = {} @@ -7672,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 = {} @@ -7688,6 +9621,11 @@ def read_namespaced_stateful_set_status_with_http_info(self, name, namespace, ** # 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, @@ -7696,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 @@ -7710,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 @@ -7741,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() @@ -7782,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' ] ) @@ -7795,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 = {} @@ -7816,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 = {} @@ -7840,6 +9807,12 @@ def replace_namespaced_controller_revision_with_http_info(self, name, namespace, # 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, @@ -7848,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 @@ -7862,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 @@ -7893,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() @@ -7934,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' ] ) @@ -7947,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 = {} @@ -7968,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 = {} @@ -7992,6 +9994,12 @@ def replace_namespaced_daemon_set_with_http_info(self, name, namespace, body, ** # 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, @@ -8000,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 @@ -8014,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 @@ -8045,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() @@ -8086,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' ] ) @@ -8099,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 = {} @@ -8120,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 = {} @@ -8144,6 +10181,12 @@ def replace_namespaced_daemon_set_status_with_http_info(self, name, namespace, b # 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, @@ -8152,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 @@ -8166,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 @@ -8197,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() @@ -8238,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' ] ) @@ -8251,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 = {} @@ -8272,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 = {} @@ -8296,6 +10368,12 @@ def replace_namespaced_deployment_with_http_info(self, name, namespace, body, ** # 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, @@ -8304,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 @@ -8318,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 @@ -8349,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() @@ -8390,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' ] ) @@ -8403,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 = {} @@ -8424,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 = {} @@ -8448,6 +10555,12 @@ def replace_namespaced_deployment_scale_with_http_info(self, name, namespace, bo # 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, @@ -8456,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 @@ -8470,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 @@ -8501,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() @@ -8542,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' ] ) @@ -8555,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 = {} @@ -8576,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 = {} @@ -8600,6 +10742,12 @@ def replace_namespaced_deployment_status_with_http_info(self, name, namespace, b # 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, @@ -8608,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 @@ -8622,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 @@ -8653,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() @@ -8694,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' ] ) @@ -8707,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 = {} @@ -8728,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 = {} @@ -8752,6 +10929,12 @@ def replace_namespaced_replica_set_with_http_info(self, name, namespace, body, * # 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, @@ -8760,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 @@ -8774,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 @@ -8805,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() @@ -8846,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' ] ) @@ -8859,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 = {} @@ -8880,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 = {} @@ -8904,6 +11116,12 @@ def replace_namespaced_replica_set_scale_with_http_info(self, name, namespace, b # 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, @@ -8912,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 @@ -8926,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 @@ -8957,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() @@ -8998,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' ] ) @@ -9011,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 = {} @@ -9032,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 = {} @@ -9056,6 +11303,12 @@ def replace_namespaced_replica_set_status_with_http_info(self, name, namespace, # 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, @@ -9064,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 @@ -9078,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 @@ -9109,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() @@ -9150,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' ] ) @@ -9163,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 = {} @@ -9184,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 = {} @@ -9208,6 +11490,12 @@ def replace_namespaced_stateful_set_with_http_info(self, name, namespace, body, # 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, @@ -9216,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 @@ -9230,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 @@ -9261,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() @@ -9302,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' ] ) @@ -9315,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 = {} @@ -9336,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 = {} @@ -9360,6 +11677,12 @@ def replace_namespaced_stateful_set_scale_with_http_info(self, name, namespace, # 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, @@ -9368,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 @@ -9382,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 @@ -9413,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() @@ -9454,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' ] ) @@ -9467,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 = {} @@ -9488,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 = {} @@ -9512,6 +11864,12 @@ def replace_namespaced_stateful_set_status_with_http_info(self, name, namespace, # 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, @@ -9520,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 27b118c98b..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.34 + 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 34e9396f22..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_self_subject_review_with_http_info(self, body, **kwargs): # noqa: E5 # 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 = {} @@ -288,6 +348,13 @@ def create_token_review_with_http_info(self, body, **kwargs): # 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 = {} @@ -393,6 +478,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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/authorization_api.py b/kubernetes/client/api/authorization_api.py index e0fe3712ea..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.34 + 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 c240ce272f..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_local_subject_access_review_with_http_info(self, namespace # 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 = {} @@ -297,6 +358,13 @@ def create_self_subject_access_review_with_http_info(self, body, **kwargs): # n # 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 = {} @@ -431,6 +526,13 @@ def create_self_subject_rules_review_with_http_info(self, body, **kwargs): # no # 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 = {} @@ -565,6 +694,13 @@ def create_subject_access_review_with_http_info(self, body, **kwargs): # noqa: # 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 = {} @@ -670,6 +824,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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 aedbf889a5..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.34 + 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 2a935fbab0..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -225,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,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' ] ) @@ -297,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 = {} @@ -308,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, # 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, @@ -360,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 @@ -374,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -407,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -452,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' ] ) @@ -465,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 = {} @@ -482,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names # 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, @@ -518,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 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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 @@ -637,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 @@ -672,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() @@ -721,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' ] ) @@ -739,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 = {} @@ -775,6 +966,11 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa # 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, @@ -783,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 @@ -797,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 @@ -833,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() @@ -884,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' ] ) @@ -897,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 = {} @@ -908,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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** # 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, @@ -952,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 @@ -966,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 @@ -998,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() @@ -1041,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' ] ) @@ -1054,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 = {} @@ -1075,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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp ['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', 'application/apply-patch+cbor']) # 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, @@ -1113,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 @@ -1127,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 @@ -1159,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() @@ -1202,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' ] ) @@ -1215,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 = {} @@ -1236,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 = {} @@ -1260,12 +1574,22 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, ['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', 'application/apply-patch+cbor']) # 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, @@ -1274,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 @@ -1288,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 @@ -1315,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() @@ -1348,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' ] ) @@ -1361,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 = {} @@ -1378,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 = {} @@ -1394,6 +1740,11 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa # 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, @@ -1402,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 @@ -1416,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 @@ -1443,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() @@ -1476,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' ] ) @@ -1489,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 = {} @@ -1506,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 = {} @@ -1522,6 +1895,11 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, # 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, @@ -1530,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 @@ -1544,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 @@ -1575,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() @@ -1616,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' ] ) @@ -1629,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 = {} @@ -1650,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 = {} @@ -1674,6 +2081,12 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name # 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, @@ -1682,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 @@ -1696,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 @@ -1727,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() @@ -1768,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' ] ) @@ -1781,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 = {} @@ -1802,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 = {} @@ -1826,6 +2268,12 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam # 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, @@ -1834,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 ce95f1f2ca..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -225,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,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' ] ) @@ -297,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 = {} @@ -308,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_horizontal_pod_autoscaler_with_http_info(self, # 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, @@ -360,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 @@ -374,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -407,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -452,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' ] ) @@ -465,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 = {} @@ -482,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, names # 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, @@ -518,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 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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 @@ -637,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 @@ -672,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() @@ -721,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' ] ) @@ -739,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 = {} @@ -775,6 +966,11 @@ def list_horizontal_pod_autoscaler_for_all_namespaces_with_http_info(self, **kwa # 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, @@ -783,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 @@ -797,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 @@ -833,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() @@ -884,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' ] ) @@ -897,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 = {} @@ -908,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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_horizontal_pod_autoscaler_with_http_info(self, namespace, ** # 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, @@ -952,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 @@ -966,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 @@ -998,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() @@ -1041,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' ] ) @@ -1054,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 = {} @@ -1075,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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namesp ['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', 'application/apply-patch+cbor']) # 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, @@ -1113,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 @@ -1127,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 @@ -1159,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() @@ -1202,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' ] ) @@ -1215,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 = {} @@ -1236,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 = {} @@ -1260,12 +1574,22 @@ def patch_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, ['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', 'application/apply-patch+cbor']) # 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, @@ -1274,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 @@ -1288,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 @@ -1315,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() @@ -1348,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' ] ) @@ -1361,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 = {} @@ -1378,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 = {} @@ -1394,6 +1740,11 @@ def read_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, namespa # 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, @@ -1402,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 @@ -1416,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 @@ -1443,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() @@ -1476,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' ] ) @@ -1489,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 = {} @@ -1506,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 = {} @@ -1522,6 +1895,11 @@ def read_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, name, # 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, @@ -1530,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 @@ -1544,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 @@ -1575,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() @@ -1616,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' ] ) @@ -1629,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 = {} @@ -1650,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 = {} @@ -1674,6 +2081,12 @@ def replace_namespaced_horizontal_pod_autoscaler_with_http_info(self, name, name # 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, @@ -1682,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 @@ -1696,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 @@ -1727,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() @@ -1768,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' ] ) @@ -1781,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 = {} @@ -1802,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 = {} @@ -1826,6 +2268,12 @@ def replace_namespaced_horizontal_pod_autoscaler_status_with_http_info(self, nam # 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, @@ -1834,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 8c9b1a1158..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.34 + 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 3881dc5d44..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): # 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 = {} @@ -306,6 +368,13 @@ def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): # no # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -368,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -427,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' ] ) @@ -440,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 = {} @@ -451,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -495,6 +613,11 @@ def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwar # 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, @@ -503,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 @@ -517,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -557,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -616,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' ] ) @@ -629,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 = {} @@ -640,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -684,6 +856,11 @@ def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): # 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, @@ -692,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 @@ -706,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -739,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -784,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' ] ) @@ -797,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 = {} @@ -814,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -842,6 +1053,12 @@ def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # 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, @@ -850,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 @@ -864,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -897,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -942,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' ] ) @@ -955,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 = {} @@ -972,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1000,6 +1251,12 @@ def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): # no # 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, @@ -1008,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 @@ -1022,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 @@ -1046,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() @@ -1073,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' ] ) @@ -1092,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 = {} @@ -1105,6 +1380,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -1113,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 @@ -1127,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 @@ -1162,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() @@ -1211,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' ] ) @@ -1229,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 = {} @@ -1265,6 +1585,11 @@ def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -1273,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 @@ -1287,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 @@ -1322,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() @@ -1371,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' ] ) @@ -1389,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 = {} @@ -1425,6 +1790,11 @@ def list_job_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -1433,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 @@ -1447,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 @@ -1483,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() @@ -1534,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' ] ) @@ -1547,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 = {} @@ -1558,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 = {} @@ -1594,6 +2005,11 @@ def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): # noqa: # 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, @@ -1602,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 @@ -1616,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 @@ -1652,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() @@ -1703,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' ] ) @@ -1716,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 = {} @@ -1727,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 = {} @@ -1763,6 +2220,11 @@ def list_namespaced_job_with_http_info(self, namespace, **kwargs): # 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, @@ -1771,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 @@ -1785,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 @@ -1817,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() @@ -1860,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' ] ) @@ -1873,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 = {} @@ -1894,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 = {} @@ -1918,12 +2411,22 @@ def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwar ['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', 'application/apply-patch+cbor']) # 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, @@ -1932,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 @@ -1946,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 @@ -1978,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() @@ -2021,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' ] ) @@ -2034,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 = {} @@ -2055,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 = {} @@ -2079,12 +2613,22 @@ def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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, @@ -2093,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 @@ -2107,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 @@ -2139,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() @@ -2182,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' ] ) @@ -2195,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 = {} @@ -2216,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 = {} @@ -2240,12 +2815,22 @@ def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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, @@ -2254,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 @@ -2268,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 @@ -2300,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() @@ -2343,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' ] ) @@ -2356,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 = {} @@ -2377,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 = {} @@ -2401,12 +3017,22 @@ def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kw ['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', 'application/apply-patch+cbor']) # 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, @@ -2415,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 @@ -2429,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 @@ -2456,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() @@ -2489,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' ] ) @@ -2502,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 = {} @@ -2519,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 = {} @@ -2535,6 +3183,11 @@ def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -2543,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 @@ -2557,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 @@ -2584,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() @@ -2617,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' ] ) @@ -2630,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 = {} @@ -2647,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 = {} @@ -2663,6 +3338,11 @@ def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwar # 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, @@ -2671,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 @@ -2685,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 @@ -2712,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() @@ -2745,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' ] ) @@ -2758,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 = {} @@ -2775,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 = {} @@ -2791,6 +3493,11 @@ def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): # noqa # 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, @@ -2799,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 @@ -2813,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 @@ -2840,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() @@ -2873,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' ] ) @@ -2886,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 = {} @@ -2903,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 = {} @@ -2919,6 +3648,11 @@ def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): # 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, @@ -2927,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 @@ -2941,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 @@ -2972,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() @@ -3013,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' ] ) @@ -3026,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 = {} @@ -3047,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 = {} @@ -3071,6 +3834,12 @@ def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kw # 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, @@ -3079,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 @@ -3093,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 @@ -3124,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() @@ -3165,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' ] ) @@ -3178,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 = {} @@ -3199,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 = {} @@ -3223,6 +4021,12 @@ def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, bod # 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, @@ -3231,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 @@ -3245,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 @@ -3276,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() @@ -3317,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' ] ) @@ -3330,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 = {} @@ -3351,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 = {} @@ -3375,6 +4208,12 @@ def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs) # 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, @@ -3383,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 @@ -3397,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 @@ -3428,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() @@ -3469,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' ] ) @@ -3482,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 = {} @@ -3503,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 = {} @@ -3527,6 +4395,12 @@ def replace_namespaced_job_status_with_http_info(self, name, namespace, body, ** # 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, @@ -3535,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 4e1bb128a5..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.34 + 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 3447d85dce..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_certificate_signing_request_with_http_info(self, body, **kwargs): # # 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,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -208,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -251,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' ] ) @@ -264,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 = {} @@ -275,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -303,6 +369,12 @@ def delete_certificate_signing_request_with_http_info(self, name, **kwargs): # # 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, @@ -311,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 @@ -325,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -364,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -421,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' ] ) @@ -439,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -483,6 +603,11 @@ def delete_collection_certificate_signing_request_with_http_info(self, **kwargs) # 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, @@ -491,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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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 @@ -610,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 @@ -645,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() @@ -694,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' ] ) @@ -712,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 = {} @@ -748,6 +936,11 @@ def list_certificate_signing_request_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -756,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 @@ -770,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 @@ -801,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() @@ -842,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' ] ) @@ -855,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 = {} @@ -870,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 = {} @@ -894,12 +1117,22 @@ def patch_certificate_signing_request_with_http_info(self, name, body, **kwargs) ['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', 'application/apply-patch+cbor']) # 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, @@ -908,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 @@ -922,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 @@ -953,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() @@ -994,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' ] ) @@ -1007,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 = {} @@ -1022,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 = {} @@ -1046,12 +1309,22 @@ def patch_certificate_signing_request_approval_with_http_info(self, name, body, ['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', 'application/apply-patch+cbor']) # 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, @@ -1060,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 @@ -1074,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 @@ -1105,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() @@ -1146,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' ] ) @@ -1159,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 = {} @@ -1174,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 = {} @@ -1198,12 +1501,22 @@ def patch_certificate_signing_request_status_with_http_info(self, name, body, ** ['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', 'application/apply-patch+cbor']) # 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, @@ -1212,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 @@ -1226,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 @@ -1252,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() @@ -1283,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' ] ) @@ -1296,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 = {} @@ -1307,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 = {} @@ -1323,6 +1657,11 @@ def read_certificate_signing_request_with_http_info(self, name, **kwargs): # no # 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, @@ -1331,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 @@ -1345,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 @@ -1371,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() @@ -1402,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' ] ) @@ -1415,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 = {} @@ -1426,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 = {} @@ -1442,6 +1802,11 @@ def read_certificate_signing_request_approval_with_http_info(self, name, **kwarg # 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, @@ -1450,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 @@ -1464,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 @@ -1490,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() @@ -1521,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' ] ) @@ -1534,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 = {} @@ -1545,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 = {} @@ -1561,6 +1947,11 @@ def read_certificate_signing_request_status_with_http_info(self, name, **kwargs) # 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, @@ -1569,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 @@ -1583,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 @@ -1613,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() @@ -1652,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' ] ) @@ -1665,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 = {} @@ -1680,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 = {} @@ -1704,6 +2123,12 @@ def replace_certificate_signing_request_with_http_info(self, name, body, **kwarg # 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, @@ -1712,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 @@ -1726,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 @@ -1756,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() @@ -1795,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' ] ) @@ -1808,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 = {} @@ -1823,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 = {} @@ -1847,6 +2300,12 @@ def replace_certificate_signing_request_approval_with_http_info(self, name, body # 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, @@ -1855,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 @@ -1869,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 @@ -1899,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() @@ -1938,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' ] ) @@ -1951,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 = {} @@ -1966,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 = {} @@ -1990,6 +2477,12 @@ def replace_certificate_signing_request_status_with_http_info(self, name, body, # 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, @@ -1998,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 168a2f7ee0..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,1781 +42,100 @@ 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 _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 - If the method is called asynchronously, - returns the request thread. - """ - 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 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 _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(V1alpha1ClusterTrustBundle, 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_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 ('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_cluster_trust_bundle`") # 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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ClusterTrustBundle', # 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_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 async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha1PodCertificateRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1alpha1PodCertificateRequest - If the method is called asynchronously, - returns the request thread. - """ - 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 async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha1PodCertificateRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1alpha1PodCertificateRequest, 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_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 ('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_certificate_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 - 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 '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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # 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_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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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_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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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', - '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' - ] - ) - - for key, 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 ('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_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 '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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{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_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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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', - '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' - ] - ) - - for key, 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 '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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', '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_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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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', - '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' - ] - ) - - for key, 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 ('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_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 '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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests', '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_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 async_req bool: execute request asynchronously - :param str name: name of the PodCertificateRequest (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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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_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 async_req bool: execute request asynchronously - :param str name: name of the PodCertificateRequest (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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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', - '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' - ] - ) - - for key, 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 ('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_certificate_request`") # noqa: E501 - # verify the required parameter 'namespace' is set - if 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_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 '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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{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', 'application/cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.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_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 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: V1alpha1ClusterTrustBundleList - If the method is called asynchronously, - returns the request thread. - """ - 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 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(V1alpha1ClusterTrustBundleList, 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_cluster_trust_bundle" % 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/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/certificates.k8s.io/v1alpha1/clustertrustbundles', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ClusterTrustBundleList', # 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_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 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: V1alpha1PodCertificateRequestList - If the method is called asynchronously, - returns the request thread. - """ - 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 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(V1alpha1PodCertificateRequestList, 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_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 ('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_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 '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/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/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1PodCertificateRequestList', # 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_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 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: V1alpha1PodCertificateRequestList - If the method is called asynchronously, - returns the request thread. - """ - 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 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(V1alpha1PodCertificateRequestList, 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_certificate_request_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/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/certificates.k8s.io/v1alpha1/podcertificaterequests', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1PodCertificateRequestList', # 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_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 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 _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for 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 - If the method is called asynchronously, - returns the request thread. - """ - 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 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 _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(V1alpha1ClusterTrustBundle, 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_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 ('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_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 - 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 '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', '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', 'application/apply-patch+cbor']) # noqa: E501 - - # Authentication setting - auth_settings = ['BearerToken'] # noqa: E501 - - return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='V1alpha1ClusterTrustBundle', # 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_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) + >>> thread = api.create_cluster_trust_bundle(body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodCertificateRequest (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 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: V1alpha1PodCertificateRequest + :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_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.create_cluster_trust_bundle_with_http_info(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 + def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E501 + """create_cluster_trust_bundle # noqa: E501 - partially update the specified PodCertificateRequest # 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.patch_namespaced_pod_certificate_request_with_http_info(name, namespace, body, 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 str name: name of the PodCertificateRequest (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 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(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() all_params = [ - 'name', - 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', - 'field_validation', - 'force' + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1824,44 +143,29 @@ def patch_namespaced_pod_certificate_request_with_http_info(self, name, namespac if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_pod_certificate_request" % key + " to method create_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 ('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_certificate_request`") # noqa: E501 - # verify the required parameter 'namespace' is set - if 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_certificate_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 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_certificate_request`") # 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 = {} 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 - 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 = {} @@ -1873,111 +177,148 @@ def patch_namespaced_pod_certificate_request_with_http_info(self, name, namespac 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` - 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', 'application/apply-patch+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/namespaces/{namespace}/podcertificaterequests/{name}', 'PATCH', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501 - """patch_namespaced_pod_certificate_request_status # noqa: E501 + def delete_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 + """delete_cluster_trust_bundle # noqa: E501 - partially update status of the specified PodCertificateRequest # 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.patch_namespaced_pod_certificate_request_status(name, namespace, body, 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 PodCertificateRequest (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 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: V1alpha1PodCertificateRequest + :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.patch_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.delete_cluster_trust_bundle_with_http_info(name, **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 + def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 + """delete_cluster_trust_bundle # noqa: E501 - partially update status of the specified PodCertificateRequest # 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.patch_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, 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 PodCertificateRequest (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 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(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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', - 'body', 'pretty', 'dry_run', - 'field_manager', - 'field_validation', - 'force' + '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' ] ) @@ -1985,44 +326,35 @@ def patch_namespaced_pod_certificate_request_status_with_http_info(self, name, n if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_namespaced_pod_certificate_request_status" % key + " 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 ('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_certificate_request_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_certificate_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 - raise ApiValueError("Missing the required parameter `body` when calling `patch_namespaced_pod_certificate_request_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 `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 - 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 - query_params.append(('fieldManager', local_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 + 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 = {} @@ -2034,93 +366,182 @@ def patch_namespaced_pod_certificate_request_status_with_http_info(self, name, n 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` - 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', 'application/apply-patch+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/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PATCH', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 + def delete_collection_cluster_trust_bundle(self, **kwargs): # noqa: E501 + """delete_collection_cluster_trust_bundle # noqa: E501 - read the specified ClusterTrustBundle # 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.read_cluster_trust_bundle(name, 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 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 pretty: If 'true', then the output is 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: V1alpha1ClusterTrustBundle + :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.read_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 + return self.delete_collection_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 - def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 - """read_cluster_trust_bundle # noqa: E501 + def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 + """delete_collection_cluster_trust_bundle # noqa: E501 - read the specified ClusterTrustBundle # 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.read_cluster_trust_bundle_with_http_info(name, 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 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 pretty: If 'true', then the output is 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(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(V1Status, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ - 'name', - 'pretty' + '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' ] ) @@ -2128,31 +549,53 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_cluster_trust_bundle" % key + " to method delete_collection_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 ('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_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # 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('_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', 'application/cbor']) # noqa: E501 @@ -2160,89 +603,103 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 # 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/{name}', 'GET', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'DELETE', path_params, query_params, header_params, 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_namespaced_pod_certificate_request(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_pod_certificate_request # noqa: E501 + def get_api_resources(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 - read the specified PodCertificateRequest # 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.read_namespaced_pod_certificate_request(name, namespace, async_req=True) + + >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodCertificateRequest (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 async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: V1alpha1PodCertificateRequest + :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.read_namespaced_pod_certificate_request_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.get_api_resources_with_http_info(**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 + def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 + """get_api_resources # noqa: E501 - read the specified PodCertificateRequest # 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.read_namespaced_pod_certificate_request_with_http_info(name, namespace, 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 str name: name of the PodCertificateRequest (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 async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. - :return: tuple(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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 = [ - 'name', - 'namespace', - 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2250,32 +707,18 @@ def read_namespaced_pod_certificate_request_with_http_info(self, name, namespace if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_namespaced_pod_certificate_request" % key + " to method get_api_resources" % 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_certificate_request`") # noqa: E501 - # verify the required parameter 'namespace' is set - if 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_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 '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 = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2288,89 +731,158 @@ def read_namespaced_pod_certificate_request_with_http_info(self, name, namespace # 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/namespaces/{namespace}/podcertificaterequests/{name}', 'GET', + '/apis/certificates.k8s.io/v1alpha1/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_certificate_request_status(self, name, namespace, **kwargs): # noqa: E501 - """read_namespaced_pod_certificate_request_status # noqa: E501 + def list_cluster_trust_bundle(self, **kwargs): # noqa: E501 + """list_cluster_trust_bundle # noqa: E501 - read status of the specified PodCertificateRequest # 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.read_namespaced_pod_certificate_request_status(name, namespace, async_req=True) + + >>> thread = api.list_cluster_trust_bundle(async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the PodCertificateRequest (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 pretty: If 'true', then the output is 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: V1alpha1PodCertificateRequest + :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.read_namespaced_pod_certificate_request_status_with_http_info(name, namespace, **kwargs) # noqa: E501 + return self.list_cluster_trust_bundle_with_http_info(**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 + def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 + """list_cluster_trust_bundle # noqa: E501 - read status of the specified PodCertificateRequest # 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.read_namespaced_pod_certificate_request_status_with_http_info(name, namespace, 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 name: name of the PodCertificateRequest (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 pretty: If 'true', then the output is 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(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() all_params = [ - 'name', - 'namespace', - 'pretty' + '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_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2378,32 +890,40 @@ def read_namespaced_pod_certificate_request_status_with_http_info(self, name, na if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_namespaced_pod_certificate_request_status" % key + " to method list_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 ('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_certificate_request_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_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # 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('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 = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2411,85 +931,121 @@ def read_namespaced_pod_certificate_request_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', 'application/cbor']) # 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/namespaces/{namespace}/podcertificaterequests/{name}/status', 'GET', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 + def patch_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 + """patch_cluster_trust_bundle # noqa: E501 - replace the specified ClusterTrustBundle # 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.replace_cluster_trust_bundle(name, body, 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 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: 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.replace_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501 + return self.patch_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 + def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501 + """patch_cluster_trust_bundle # noqa: E501 - replace the specified ClusterTrustBundle # 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.replace_cluster_trust_bundle_with_http_info(name, body, 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 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: 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() @@ -2500,14 +1056,18 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # 'pretty', 'dry_run', 'field_manager', - 'field_validation' + 'field_validation', + 'force' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2515,18 +1075,16 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_cluster_trust_bundle" % key + " 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 ('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_cluster_trust_bundle`") # noqa: E501 + if self.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 - raise ApiValueError("Missing the required parameter `body` when calling `replace_cluster_trust_bundle`") # 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 = {} @@ -2535,16 +1093,18 @@ 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 + 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 = {} @@ -2556,104 +1116,125 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # 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: "V1alpha1ClusterTrustBundle", + 201: "V1alpha1ClusterTrustBundle", + 401: None, + } + return self.api_client.call_api( - '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PUT', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PATCH', path_params, query_params, header_params, 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_namespaced_pod_certificate_request(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_pod_certificate_request # noqa: E501 + def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 + """read_cluster_trust_bundle # noqa: E501 - replace the specified PodCertificateRequest # 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.replace_namespaced_pod_certificate_request(name, namespace, body, 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 PodCertificateRequest (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha1PodCertificateRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-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: V1alpha1PodCertificateRequest + :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_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.read_cluster_trust_bundle_with_http_info(name, **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 + def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 + """read_cluster_trust_bundle # noqa: E501 - replace the specified PodCertificateRequest # 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.replace_namespaced_pod_certificate_request_with_http_info(name, namespace, body, 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 PodCertificateRequest (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha1PodCertificateRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-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(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() all_params = [ 'name', - 'namespace', - 'body', - 'pretty', - 'dry_run', - 'field_manager', - 'field_validation' + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2661,49 +1242,30 @@ def replace_namespaced_pod_certificate_request_with_http_info(self, name, namesp if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_pod_certificate_request" % key + " 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 ('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_certificate_request`") # noqa: E501 - # verify the required parameter 'namespace' is set - if 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_certificate_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 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_certificate_request`") # noqa: E501 + if self.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 - 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 - 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/cbor']) # noqa: E501 @@ -2711,89 +1273,118 @@ def replace_namespaced_pod_certificate_request_with_http_info(self, name, namesp # 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/namespaces/{namespace}/podcertificaterequests/{name}', 'PUT', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501 - """replace_namespaced_pod_certificate_request_status # noqa: E501 + def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 + """replace_cluster_trust_bundle # noqa: E501 - replace status of the specified PodCertificateRequest # 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_namespaced_pod_certificate_request_status(name, namespace, body, 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 PodCertificateRequest (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha1PodCertificateRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1alpha1PodCertificateRequest + :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_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 + return self.replace_cluster_trust_bundle_with_http_info(name, 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 + def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_cluster_trust_bundle # noqa: E501 - replace status of the specified PodCertificateRequest # 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_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, 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 PodCertificateRequest (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha1PodCertificateRequest body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1alpha1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() all_params = [ 'name', - 'namespace', 'body', 'pretty', 'dry_run', @@ -2805,7 +1396,10 @@ def replace_namespaced_pod_certificate_request_status_with_http_info(self, name, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2813,42 +1407,34 @@ def replace_namespaced_pod_certificate_request_status_with_http_info(self, name, if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_namespaced_pod_certificate_request_status" % key + " 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 ('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_certificate_request_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_certificate_request_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_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 - raise ApiValueError("Missing the required parameter `body` when calling `replace_namespaced_pod_certificate_request_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_cluster_trust_bundle`") # 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 = {} @@ -2863,18 +1449,25 @@ def replace_namespaced_pod_certificate_request_status_with_http_info(self, name, # 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/namespaces/{namespace}/podcertificaterequests/{name}/status', 'PUT', + '/apis/certificates.k8s.io/v1alpha1/clustertrustbundles/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha1PodCertificateRequest', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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 index bb9382f570..75dcf4b26d 100644 --- a/kubernetes/client/api/certificates_v1beta1_api.py +++ b/kubernetes/client/api/certificates_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,73 +42,2268 @@ 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 V1beta1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ClusterTrustBundle + :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_cluster_trust_bundle_with_http_info(body, **kwargs) # noqa: E501 + return self.patch_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E501 - """create_cluster_trust_bundle # 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 - create a ClusterTrustBundle # 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.create_cluster_trust_bundle_with_http_info(body, async_req=True) + + >>> thread = api.patch_namespaced_pod_certificate_request_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param V1beta1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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' + 'field_validation', + 'force' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -116,30 +2311,41 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method create_cluster_trust_bundle" % key + " 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 ('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_cluster_trust_bundle`") # 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_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if 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 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 = {} @@ -151,107 +2357,155 @@ def create_cluster_trust_bundle_with_http_info(self, body, **kwargs): # noqa: E 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/clustertrustbundles', 'POST', + '/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_type='V1beta1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 + def patch_namespaced_pod_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501 + """patch_namespaced_pod_certificate_request_status # noqa: E501 - delete a ClusterTrustBundle # 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.delete_cluster_trust_bundle(name, async_req=True) + + >>> thread = api.patch_namespaced_pod_certificate_request_status(name, namespace, body, 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1Status + :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.delete_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 + return self.patch_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 - """delete_cluster_trust_bundle # 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 - delete a ClusterTrustBundle # 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.delete_cluster_trust_bundle_with_http_info(name, async_req=True) + + >>> thread = api.patch_namespaced_pod_certificate_request_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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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(V1beta1PodCertificateRequest, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'name', + 'namespace', + 'body', 'pretty', 'dry_run', - 'grace_period_seconds', - 'ignore_store_read_error_with_cluster_breaking_potential', - 'orphan_dependents', - 'propagation_policy', - 'body' + 'field_manager', + 'field_validation', + 'force' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -259,36 +2513,41 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_cluster_trust_bundle" % key + " 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 ('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_cluster_trust_bundle`") # noqa: E501 + if self.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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 - query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) # noqa: E501 - if 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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 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 = {} @@ -300,128 +2559,125 @@ def delete_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E 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/clustertrustbundles/{name}', 'DELETE', + '/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_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 + def read_cluster_trust_bundle(self, name, **kwargs): # noqa: E501 + """read_cluster_trust_bundle # noqa: E501 - delete collection of ClusterTrustBundle # 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.delete_collection_cluster_trust_bundle(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 pretty: If 'true', then the 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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: V1Status + :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.delete_collection_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 + return self.read_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 - def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 - """delete_collection_cluster_trust_bundle # noqa: E501 + def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 + """read_cluster_trust_bundle # noqa: E501 - delete collection of ClusterTrustBundle # 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.delete_collection_cluster_trust_bundle_with_http_info(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 pretty: If 'true', then the 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 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(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(V1beta1ClusterTrustBundle, 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' + 'name', + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -429,53 +2685,30 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method delete_collection_cluster_trust_bundle" % key + " 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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # 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 - 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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 = {} + 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 @@ -483,80 +2716,118 @@ def delete_collection_cluster_trust_bundle_with_http_info(self, **kwargs): # no # 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', 'DELETE', + '/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_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 read_namespaced_pod_certificate_request(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request # noqa: E501 - get available resources # 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.get_api_resources(async_req=True) + + >>> thread = api.read_namespaced_pod_certificate_request(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :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: V1APIResourceList + :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.get_api_resources_with_http_info(**kwargs) # noqa: E501 + return self.read_namespaced_pod_certificate_request_with_http_info(name, namespace, **kwargs) # noqa: E501 - def get_api_resources_with_http_info(self, **kwargs): # noqa: E501 - """get_api_resources # noqa: E501 + def read_namespaced_pod_certificate_request_with_http_info(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request # noqa: E501 - get available resources # 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.get_api_resources_with_http_info(async_req=True) + + >>> thread = api.read_namespaced_pod_certificate_request_with_http_info(name, namespace, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously + :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. - :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(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_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -564,18 +2835,30 @@ 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 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 = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -588,113 +2871,118 @@ def get_api_resources_with_http_info(self, **kwargs): # 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/', 'GET', + '/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_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 + def read_namespaced_pod_certificate_request_status(self, name, namespace, **kwargs): # noqa: E501 + """read_namespaced_pod_certificate_request_status # noqa: E501 - list or watch objects of kind ClusterTrustBundle # 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.list_cluster_trust_bundle(async_req=True) + + >>> thread = api.read_namespaced_pod_certificate_request_status(name, 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 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: V1beta1ClusterTrustBundleList + :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.list_cluster_trust_bundle_with_http_info(**kwargs) # noqa: E501 + return self.read_namespaced_pod_certificate_request_status_with_http_info(name, namespace, **kwargs) # noqa: E501 - def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 - """list_cluster_trust_bundle # 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 - list or watch objects of kind ClusterTrustBundle # 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.list_cluster_trust_bundle_with_http_info(async_req=True) + + >>> thread = api.read_namespaced_pod_certificate_request_status_with_http_info(name, 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 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. - :return: tuple(V1beta1ClusterTrustBundleList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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 = [ - 'pretty', - 'allow_watch_bookmarks', - '_continue', - 'field_selector', - 'label_selector', - 'limit', - 'resource_version', - 'resource_version_match', - 'send_initial_events', - 'timeout_seconds', - 'watch' + 'name', + 'namespace', + 'pretty' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -702,40 +2990,30 @@ def list_cluster_trust_bundle_with_http_info(self, **kwargs): # noqa: E501 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method list_cluster_trust_bundle" % key + " 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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # 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 = {} @@ -743,87 +3021,117 @@ 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/cbor', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch', 'application/cbor-seq']) # noqa: E501 + ['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/clustertrustbundles', 'GET', + '/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_type='V1beta1ClusterTrustBundleList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 + def replace_cluster_trust_bundle(self, name, body, **kwargs): # noqa: E501 + """replace_cluster_trust_bundle # noqa: E501 - partially update the specified ClusterTrustBundle # 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.patch_cluster_trust_bundle(name, body, 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 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: 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: V1beta1ClusterTrustBundle + :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 + return self.replace_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 + def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501 + """replace_cluster_trust_bundle # noqa: E501 - partially update the specified ClusterTrustBundle # 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.patch_cluster_trust_bundle_with_http_info(name, body, 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 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: 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. - :return: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -834,15 +3142,17 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no 'pretty', 'dry_run', 'field_manager', - 'field_validation', - 'force' + 'field_validation' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -850,18 +3160,16 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method patch_cluster_trust_bundle" % key + " 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 ('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_cluster_trust_bundle`") # noqa: E501 + if self.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 - raise ApiValueError("Missing the required parameter `body` when calling `patch_cluster_trust_bundle`") # 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 = {} @@ -870,18 +3178,16 @@ 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 - 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 = {} @@ -893,93 +3199,142 @@ def patch_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # no 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` - 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', 'application/apply-patch+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}', 'PATCH', + '/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_type='V1beta1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 + def replace_namespaced_pod_certificate_request(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_certificate_request # noqa: E501 - read the specified ClusterTrustBundle # 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.read_cluster_trust_bundle(name, async_req=True) + + >>> thread = api.replace_namespaced_pod_certificate_request(name, namespace, body, 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 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: V1beta1ClusterTrustBundle + :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_cluster_trust_bundle_with_http_info(name, **kwargs) # noqa: E501 + return self.replace_namespaced_pod_certificate_request_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E501 - """read_cluster_trust_bundle # 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 - read the specified ClusterTrustBundle # 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.read_cluster_trust_bundle_with_http_info(name, async_req=True) + + >>> thread = api.replace_namespaced_pod_certificate_request_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 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 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. - :return: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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', - 'pretty' + 'namespace', + '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' ] ) @@ -987,31 +3342,46 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method read_cluster_trust_bundle" % key + " 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 ('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_cluster_trust_bundle`") # noqa: E501 + if self.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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # 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', 'application/cbor']) # noqa: E501 @@ -1019,86 +3389,124 @@ def read_cluster_trust_bundle_with_http_info(self, name, **kwargs): # noqa: E50 # 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/clustertrustbundles/{name}', 'GET', + '/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_type='V1beta1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 + def replace_namespaced_pod_certificate_request_status(self, name, namespace, body, **kwargs): # noqa: E501 + """replace_namespaced_pod_certificate_request_status # noqa: E501 - replace the specified ClusterTrustBundle # 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_cluster_trust_bundle(name, body, async_req=True) + + >>> thread = api.replace_namespaced_pod_certificate_request_status(name, namespace, body, async_req=True) >>> result = thread.get() - :param async_req bool: execute request asynchronously - :param str name: name of the ClusterTrustBundle (required) - :param V1beta1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1ClusterTrustBundle + :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_cluster_trust_bundle_with_http_info(name, body, **kwargs) # noqa: E501 + return self.replace_namespaced_pod_certificate_request_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 - def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # noqa: E501 - """replace_cluster_trust_bundle # 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 the specified ClusterTrustBundle # 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_cluster_trust_bundle_with_http_info(name, body, async_req=True) + + >>> thread = api.replace_namespaced_pod_certificate_request_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 ClusterTrustBundle (required) - :param V1beta1ClusterTrustBundle body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1ClusterTrustBundle, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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', @@ -1110,7 +3518,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' ] ) @@ -1118,36 +3529,39 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" - " to method replace_cluster_trust_bundle" % key + " 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 ('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_cluster_trust_bundle`") # noqa: E501 + if self.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 ('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_cluster_trust_bundle`") # 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_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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # noqa: E501 + if local_var_params.get('pretty') is not None: # noqa: E501 query_params.append(('pretty', local_var_params['pretty'])) # noqa: E501 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if 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 = {} @@ -1162,18 +3576,25 @@ def replace_cluster_trust_bundle_with_http_info(self, name, body, **kwargs): # # 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/clustertrustbundles/{name}', 'PUT', + '/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_type='V1beta1ClusterTrustBundle', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_api.py b/kubernetes/client/api/coordination_api.py index 6557f73daf..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.34 + 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 91e4b3d20e..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_lease_with_http_info(self, namespace, body, **kwargs): # # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -225,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,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' ] ) @@ -297,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 = {} @@ -308,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_lease_with_http_info(self, namespace, **kwargs) # 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, @@ -360,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 @@ -374,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -407,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -452,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' ] ) @@ -465,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 = {} @@ -482,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -518,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 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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 @@ -637,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 @@ -672,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() @@ -721,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' ] ) @@ -739,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 = {} @@ -775,6 +966,11 @@ def list_lease_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -783,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 @@ -797,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 @@ -833,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() @@ -884,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' ] ) @@ -897,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 = {} @@ -908,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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_lease_with_http_info(self, namespace, **kwargs): # noqa: E5 # 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, @@ -952,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 @@ -966,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 @@ -998,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() @@ -1041,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' ] ) @@ -1054,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 = {} @@ -1075,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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_lease_with_http_info(self, name, namespace, body, **kwargs) ['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', 'application/apply-patch+cbor']) # 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, @@ -1113,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 @@ -1127,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 @@ -1154,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() @@ -1187,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' ] ) @@ -1200,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 = {} @@ -1217,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 = {} @@ -1233,6 +1538,11 @@ def read_namespaced_lease_with_http_info(self, name, namespace, **kwargs): # no # 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, @@ -1241,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 @@ -1255,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 @@ -1286,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() @@ -1327,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' ] ) @@ -1340,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 = {} @@ -1361,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 = {} @@ -1385,6 +1724,12 @@ def replace_namespaced_lease_with_http_info(self, name, namespace, body, **kwarg # 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, @@ -1393,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 index 7572fa1957..f6633caf00 100644 --- a/kubernetes/client/api/coordination_v1alpha2_api.py +++ b/kubernetes/client/api/coordination_v1alpha2_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_lease_candidate(self, namespace, body, **kwargs): # noqa: 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 async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1alpha2LeaseCandidate + :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 @@ -72,28 +82,44 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw 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 async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -111,7 +137,10 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw '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_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'body' is set - if 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_candidate`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_lease_candidate_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 = {} @@ -163,6 +190,13 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw # 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, @@ -171,13 +205,14 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha2LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_lease_candidate # noqa: E501 @@ -185,36 +220,56 @@ def delete_collection_namespaced_lease_candidate(self, namespace, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_candidate_with_http_info(namespace, **kwargs) # noqa: E501 @@ -225,38 +280,64 @@ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,7 +365,10 @@ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -297,8 +381,7 @@ def delete_collection_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 collection_formats = {} @@ -308,36 +391,36 @@ def delete_collection_namespaced_lease_candidate_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, # 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, @@ -360,13 +448,14 @@ def delete_collection_namespaced_lease_candidate_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_lease_candidate(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_lease_candidate # noqa: E501 @@ -374,29 +463,42 @@ def delete_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -407,31 +509,50 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kw 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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() @@ -452,7 +573,10 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -465,12 +589,10 @@ def delete_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 = {} @@ -482,20 +604,20 @@ def delete_namespaced_lease_candidate_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kw # 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, @@ -518,13 +646,14 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, 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 get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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_candidate_for_all_namespaces(self, **kwargs): # noqa: E501 """list_lease_candidate_for_all_namespaces # noqa: E501 @@ -637,31 +789,46 @@ def list_lease_candidate_for_all_namespaces(self, **kwargs): # 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 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: V1alpha2LeaseCandidateList + :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 @@ -672,33 +839,54 @@ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # n 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 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(V1alpha2LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -721,7 +909,10 @@ def list_lease_candidate_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' ] ) @@ -739,30 +930,30 @@ def list_lease_candidate_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 = {} @@ -775,6 +966,11 @@ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # n # 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, @@ -783,13 +979,14 @@ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha2LeaseCandidateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, namespace, **kwargs): # noqa: E501 """list_namespaced_lease_candidate # noqa: E501 @@ -797,32 +994,48 @@ def list_namespaced_lease_candidate(self, namespace, **kwargs): # 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 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: V1alpha2LeaseCandidateList + :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 @@ -833,34 +1046,56 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): 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 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(V1alpha2LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -884,7 +1119,10 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -897,8 +1135,7 @@ def list_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 collection_formats = {} @@ -908,30 +1145,30 @@ def list_namespaced_lease_candidate_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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # 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, @@ -952,13 +1194,14 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha2LeaseCandidateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_lease_candidate # noqa: E501 @@ -966,28 +1209,40 @@ def patch_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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: V1alpha2LeaseCandidate + :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 @@ -998,30 +1253,48 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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. - :return: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1041,7 +1314,10 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1054,16 +1330,13 @@ def patch_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 ('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_candidate`") # noqa: E501 collection_formats = {} @@ -1075,18 +1348,18 @@ def patch_namespaced_lease_candidate_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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "V1alpha2LeaseCandidate", + 201: "V1alpha2LeaseCandidate", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1alpha2/namespaces/{namespace}/leasecandidates/{name}', 'PATCH', path_params, @@ -1113,13 +1396,14 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha2LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_lease_candidate # noqa: E501 @@ -1127,23 +1411,30 @@ def read_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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: V1alpha2LeaseCandidate + :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 @@ -1154,25 +1445,38 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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. - :return: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1187,7 +1491,10 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1200,12 +1507,10 @@ def read_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 = {} @@ -1217,10 +1522,10 @@ def read_namespaced_lease_candidate_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 = {} @@ -1233,6 +1538,11 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar # 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, @@ -1241,13 +1551,14 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha2LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_lease_candidate # noqa: E501 @@ -1255,27 +1566,38 @@ def replace_namespaced_lease_candidate(self, name, namespace, body, **kwargs): 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1alpha2LeaseCandidate + :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 @@ -1286,29 +1608,46 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1alpha2LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1alpha2LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1327,7 +1666,10 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1340,16 +1682,13 @@ def replace_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 ('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_candidate`") # noqa: E501 collection_formats = {} @@ -1361,16 +1700,16 @@ def replace_namespaced_lease_candidate_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 = {} @@ -1385,6 +1724,12 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod # 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, @@ -1393,10 +1738,11 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha2LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_v1beta1_api.py b/kubernetes/client/api/coordination_v1beta1_api.py index 4e3d42c862..73ac7026e6 100644 --- a/kubernetes/client/api/coordination_v1beta1_api.py +++ b/kubernetes/client/api/coordination_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,26 +42,36 @@ def create_namespaced_lease_candidate(self, namespace, body, **kwargs): # noqa: 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 async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1beta1LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1LeaseCandidate + :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 @@ -72,28 +82,44 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw 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 async_req bool: execute request asynchronously - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1beta1LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -111,7 +137,10 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw '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_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'body' is set - if 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_candidate`") # noqa: E501 collection_formats = {} @@ -139,16 +166,16 @@ def create_namespaced_lease_candidate_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 = {} @@ -163,6 +190,13 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw # 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, @@ -171,13 +205,14 @@ def create_namespaced_lease_candidate_with_http_info(self, namespace, body, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_lease_candidate # noqa: E501 @@ -185,36 +220,56 @@ def delete_collection_namespaced_lease_candidate(self, namespace, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_candidate_with_http_info(namespace, **kwargs) # noqa: E501 @@ -225,38 +280,64 @@ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,7 +365,10 @@ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -297,8 +381,7 @@ def delete_collection_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 collection_formats = {} @@ -308,36 +391,36 @@ def delete_collection_namespaced_lease_candidate_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_lease_candidate_with_http_info(self, namespace, # 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, @@ -360,13 +448,14 @@ def delete_collection_namespaced_lease_candidate_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_lease_candidate(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_lease_candidate # noqa: E501 @@ -374,29 +463,42 @@ def delete_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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_candidate_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -407,31 +509,50 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kw 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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() @@ -452,7 +573,10 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -465,12 +589,10 @@ def delete_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 = {} @@ -482,20 +604,20 @@ def delete_namespaced_lease_candidate_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, namespace, **kw # 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, @@ -518,13 +646,14 @@ def delete_namespaced_lease_candidate_with_http_info(self, name, 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 get_api_resources(self, **kwargs): # noqa: E501 """get_api_resources # noqa: E501 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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_candidate_for_all_namespaces(self, **kwargs): # noqa: E501 """list_lease_candidate_for_all_namespaces # noqa: E501 @@ -637,31 +789,46 @@ def list_lease_candidate_for_all_namespaces(self, **kwargs): # 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 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: V1beta1LeaseCandidateList + :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 @@ -672,33 +839,54 @@ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # n 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 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(V1beta1LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -721,7 +909,10 @@ def list_lease_candidate_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' ] ) @@ -739,30 +930,30 @@ def list_lease_candidate_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 = {} @@ -775,6 +966,11 @@ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # n # 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, @@ -783,13 +979,14 @@ def list_lease_candidate_for_all_namespaces_with_http_info(self, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1LeaseCandidateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, namespace, **kwargs): # noqa: E501 """list_namespaced_lease_candidate # noqa: E501 @@ -797,32 +994,48 @@ def list_namespaced_lease_candidate(self, namespace, **kwargs): # 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 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: V1beta1LeaseCandidateList + :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 @@ -833,34 +1046,56 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): 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 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(V1beta1LeaseCandidateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -884,7 +1119,10 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -897,8 +1135,7 @@ def list_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 collection_formats = {} @@ -908,30 +1145,30 @@ def list_namespaced_lease_candidate_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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): # 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, @@ -952,13 +1194,14 @@ def list_namespaced_lease_candidate_with_http_info(self, namespace, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1LeaseCandidateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_lease_candidate # noqa: E501 @@ -966,28 +1209,40 @@ def patch_namespaced_lease_candidate(self, name, namespace, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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: V1beta1LeaseCandidate + :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 @@ -998,30 +1253,48 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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. - :return: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1041,7 +1314,10 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1054,16 +1330,13 @@ def patch_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 ('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_candidate`") # noqa: E501 collection_formats = {} @@ -1075,18 +1348,18 @@ def patch_namespaced_lease_candidate_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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "V1beta1LeaseCandidate", + 201: "V1beta1LeaseCandidate", + 401: None, + } + return self.api_client.call_api( '/apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}', 'PATCH', path_params, @@ -1113,13 +1396,14 @@ def patch_namespaced_lease_candidate_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_lease_candidate # noqa: E501 @@ -1127,23 +1411,30 @@ def read_namespaced_lease_candidate(self, name, namespace, **kwargs): # noqa: E 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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: V1beta1LeaseCandidate + :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 @@ -1154,25 +1445,38 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (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 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. - :return: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1187,7 +1491,10 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1200,12 +1507,10 @@ def read_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 = {} @@ -1217,10 +1522,10 @@ def read_namespaced_lease_candidate_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 = {} @@ -1233,6 +1538,11 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar # 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, @@ -1241,13 +1551,14 @@ def read_namespaced_lease_candidate_with_http_info(self, name, namespace, **kwar body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_candidate(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_lease_candidate # noqa: E501 @@ -1255,27 +1566,38 @@ def replace_namespaced_lease_candidate(self, name, namespace, body, **kwargs): 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1beta1LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1LeaseCandidate + :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 @@ -1286,29 +1608,46 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod 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 async_req bool: execute request asynchronously - :param str name: name of the LeaseCandidate (required) - :param str namespace: object name and auth scope, such as for teams and projects (required) - :param V1beta1LeaseCandidate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1LeaseCandidate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1327,7 +1666,10 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1340,16 +1682,13 @@ def replace_namespaced_lease_candidate_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_lease_candidate`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 ('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_candidate`") # noqa: E501 collection_formats = {} @@ -1361,16 +1700,16 @@ def replace_namespaced_lease_candidate_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 = {} @@ -1385,6 +1724,12 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod # 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, @@ -1393,10 +1738,11 @@ def replace_namespaced_lease_candidate_with_http_info(self, name, namespace, bod body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1LeaseCandidate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_api.py b/kubernetes/client/api/core_api.py index 71ad82a149..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.34 + 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 4ea0ed311b..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.34 + 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 = {} @@ -6451,6 +7816,13 @@ def create_namespace_with_http_info(self, body, **kwargs): # 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 = {} @@ -6594,6 +7994,13 @@ def create_namespaced_binding_with_http_info(self, namespace, body, **kwargs): # 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 = {} @@ -6737,6 +8172,13 @@ def create_namespaced_config_map_with_http_info(self, namespace, body, **kwargs) # 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 = {} @@ -6880,6 +8350,13 @@ def create_namespaced_endpoints_with_http_info(self, namespace, body, **kwargs): # 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 = {} @@ -7023,6 +8528,13 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # # 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 = {} @@ -7166,6 +8706,13 @@ def create_namespaced_limit_range_with_http_info(self, namespace, body, **kwargs # 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 = {} @@ -7309,6 +8884,13 @@ def create_namespaced_persistent_volume_claim_with_http_info(self, namespace, bo # 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 = {} @@ -7452,6 +9062,13 @@ def create_namespaced_pod_with_http_info(self, namespace, body, **kwargs): # no # 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 = {} @@ -7604,6 +9250,13 @@ def create_namespaced_pod_binding_with_http_info(self, name, namespace, body, ** # 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 = {} @@ -7756,6 +9438,13 @@ def create_namespaced_pod_eviction_with_http_info(self, name, namespace, body, * # 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 = {} @@ -7899,6 +9616,13 @@ def create_namespaced_pod_template_with_http_info(self, namespace, body, **kwarg # 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 = {} @@ -8042,6 +9794,13 @@ def create_namespaced_replication_controller_with_http_info(self, namespace, bod # 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 = {} @@ -8185,6 +9972,13 @@ def create_namespaced_resource_quota_with_http_info(self, namespace, body, **kwa # 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 = {} @@ -8328,6 +10150,13 @@ def create_namespaced_secret_with_http_info(self, namespace, body, **kwargs): # # 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 = {} @@ -8471,6 +10328,13 @@ def create_namespaced_service_with_http_info(self, namespace, body, **kwargs): # 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 = {} @@ -8614,6 +10506,13 @@ def create_namespaced_service_account_with_http_info(self, namespace, body, **kw # 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 = {} @@ -8766,6 +10694,13 @@ def create_namespaced_service_account_token_with_http_info(self, name, namespace # 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 = {} @@ -8900,6 +10862,13 @@ def create_node_with_http_info(self, body, **kwargs): # 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 = {} @@ -9034,6 +11030,13 @@ def create_persistent_volume_with_http_info(self, body, **kwargs): # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -9096,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -9155,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' ] ) @@ -9168,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 = {} @@ -9179,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -9223,6 +11275,11 @@ def delete_collection_namespaced_config_map_with_http_info(self, namespace, **kw # 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, @@ -9231,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 @@ -9245,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -9285,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -9344,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' ] ) @@ -9357,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 = {} @@ -9368,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -9412,6 +11518,11 @@ def delete_collection_namespaced_endpoints_with_http_info(self, namespace, **kwa # 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, @@ -9420,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 @@ -9434,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -9474,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -9533,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' ] ) @@ -9546,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 = {} @@ -9557,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -9601,6 +11761,11 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) # 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, @@ -9609,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 @@ -9623,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -9663,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -9722,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' ] ) @@ -9735,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 = {} @@ -9746,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -9790,6 +12004,11 @@ def delete_collection_namespaced_limit_range_with_http_info(self, namespace, **k # 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, @@ -9798,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 @@ -9812,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -9852,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -9911,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' ] ) @@ -9924,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 = {} @@ -9935,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -9979,6 +12247,11 @@ def delete_collection_namespaced_persistent_volume_claim_with_http_info(self, na # 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, @@ -9987,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 @@ -10001,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -10041,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -10100,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' ] ) @@ -10113,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 = {} @@ -10124,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -10168,6 +12490,11 @@ def delete_collection_namespaced_pod_with_http_info(self, namespace, **kwargs): # 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, @@ -10176,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 @@ -10190,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -10230,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -10289,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' ] ) @@ -10302,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 = {} @@ -10313,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -10357,6 +12733,11 @@ def delete_collection_namespaced_pod_template_with_http_info(self, namespace, ** # 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, @@ -10365,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 @@ -10379,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -10419,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -10478,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' ] ) @@ -10491,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 = {} @@ -10502,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -10546,6 +12976,11 @@ def delete_collection_namespaced_replication_controller_with_http_info(self, nam # 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, @@ -10554,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 @@ -10568,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -10608,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -10667,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' ] ) @@ -10680,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 = {} @@ -10691,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -10735,6 +13219,11 @@ def delete_collection_namespaced_resource_quota_with_http_info(self, namespace, # 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, @@ -10743,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 @@ -10757,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -10797,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -10856,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' ] ) @@ -10869,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 = {} @@ -10880,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -10924,6 +13462,11 @@ def delete_collection_namespaced_secret_with_http_info(self, namespace, **kwargs # 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, @@ -10932,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 @@ -10946,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -10986,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -11045,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' ] ) @@ -11058,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 = {} @@ -11069,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -11113,6 +13705,11 @@ def delete_collection_namespaced_service_with_http_info(self, namespace, **kwarg # 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, @@ -11121,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 @@ -11135,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -11175,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -11234,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' ] ) @@ -11247,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 = {} @@ -11258,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -11302,6 +13948,11 @@ def delete_collection_namespaced_service_account_with_http_info(self, namespace, # 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, @@ -11310,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 @@ -11324,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -11363,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -11420,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' ] ) @@ -11438,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -11482,6 +14181,11 @@ def delete_collection_node_with_http_info(self, **kwargs): # 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, @@ -11490,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 @@ -11504,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -11543,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -11600,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' ] ) @@ -11618,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -11662,6 +14414,11 @@ def delete_collection_persistent_volume_with_http_info(self, **kwargs): # noqa: # 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, @@ -11670,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 @@ -11684,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -11716,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -11759,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' ] ) @@ -11772,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 = {} @@ -11783,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11811,6 +14601,12 @@ def delete_namespace_with_http_info(self, name, **kwargs): # 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, @@ -11819,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 @@ -11833,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -11866,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -11911,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' ] ) @@ -11924,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 = {} @@ -11941,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -11969,6 +14799,12 @@ def delete_namespaced_config_map_with_http_info(self, name, namespace, **kwargs) # 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, @@ -11977,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 @@ -11991,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12024,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -12069,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' ] ) @@ -12082,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 = {} @@ -12099,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12127,6 +14997,12 @@ def delete_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): # 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, @@ -12135,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 @@ -12149,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12182,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -12227,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' ] ) @@ -12240,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 = {} @@ -12257,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12285,6 +15195,12 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -12293,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 @@ -12307,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12340,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -12385,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' ] ) @@ -12398,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 = {} @@ -12415,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12443,6 +15393,12 @@ def delete_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs # 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, @@ -12451,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 @@ -12465,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12498,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -12543,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' ] ) @@ -12556,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 = {} @@ -12573,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12601,6 +15591,12 @@ def delete_namespaced_persistent_volume_claim_with_http_info(self, name, namespa # 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, @@ -12609,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 @@ -12623,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12656,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -12701,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' ] ) @@ -12714,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 = {} @@ -12731,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12759,6 +15789,12 @@ def delete_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # no # 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, @@ -12767,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 @@ -12781,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12814,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -12859,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' ] ) @@ -12872,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 = {} @@ -12889,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -12917,6 +15987,12 @@ def delete_namespaced_pod_template_with_http_info(self, name, namespace, **kwarg # 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, @@ -12925,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 @@ -12939,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -12972,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13017,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' ] ) @@ -13030,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 = {} @@ -13047,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13075,6 +16185,12 @@ def delete_namespaced_replication_controller_with_http_info(self, name, namespac # 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, @@ -13083,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 @@ -13097,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -13130,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13175,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' ] ) @@ -13188,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 = {} @@ -13205,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13233,6 +16383,12 @@ def delete_namespaced_resource_quota_with_http_info(self, name, namespace, **kwa # 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, @@ -13241,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 @@ -13255,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -13288,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13333,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' ] ) @@ -13346,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 = {} @@ -13363,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13391,6 +16581,12 @@ def delete_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -13399,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 @@ -13413,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -13446,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13491,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' ] ) @@ -13504,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 = {} @@ -13521,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13549,6 +16779,12 @@ def delete_namespaced_service_with_http_info(self, name, namespace, **kwargs): # 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, @@ -13557,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 @@ -13571,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -13604,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13649,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' ] ) @@ -13662,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 = {} @@ -13679,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13707,6 +16977,12 @@ def delete_namespaced_service_account_with_http_info(self, name, namespace, **kw # 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, @@ -13715,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 @@ -13729,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -13761,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13804,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' ] ) @@ -13817,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 = {} @@ -13828,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -13856,6 +17165,12 @@ def delete_node_with_http_info(self, name, **kwargs): # 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, @@ -13864,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 @@ -13878,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -13910,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -13953,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' ] ) @@ -13966,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 = {} @@ -13977,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -14005,6 +17353,12 @@ def delete_persistent_volume_with_http_info(self, name, **kwargs): # 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, @@ -14013,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 @@ -14027,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 @@ -14051,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() @@ -14078,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' ] ) @@ -14097,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 = {} @@ -14110,6 +17482,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -14118,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 @@ -14132,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 @@ -14167,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() @@ -14216,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' ] ) @@ -14234,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 = {} @@ -14270,6 +17687,11 @@ def list_component_status_with_http_info(self, **kwargs): # 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, @@ -14278,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 @@ -14292,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 @@ -14327,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() @@ -14376,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' ] ) @@ -14394,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 = {} @@ -14430,6 +17892,11 @@ def list_config_map_for_all_namespaces_with_http_info(self, **kwargs): # noqa: # 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, @@ -14438,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 @@ -14452,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 @@ -14487,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() @@ -14536,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' ] ) @@ -14554,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 = {} @@ -14590,6 +18097,11 @@ def list_endpoints_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E # 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, @@ -14598,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 @@ -14612,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 @@ -14647,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() @@ -14696,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' ] ) @@ -14714,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 = {} @@ -14750,6 +18302,11 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -14758,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 @@ -14772,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 @@ -14807,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() @@ -14856,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' ] ) @@ -14874,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 = {} @@ -14910,6 +18507,11 @@ def list_limit_range_for_all_namespaces_with_http_info(self, **kwargs): # noqa: # 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, @@ -14918,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 @@ -14932,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 @@ -14967,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() @@ -15016,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' ] ) @@ -15034,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 = {} @@ -15070,6 +18712,11 @@ def list_namespace_with_http_info(self, **kwargs): # 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, @@ -15078,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 @@ -15092,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 @@ -15128,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() @@ -15179,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' ] ) @@ -15192,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 = {} @@ -15203,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 = {} @@ -15239,6 +18927,11 @@ def list_namespaced_config_map_with_http_info(self, namespace, **kwargs): # noq # 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, @@ -15247,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 @@ -15261,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 @@ -15297,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() @@ -15348,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' ] ) @@ -15361,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 = {} @@ -15372,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 = {} @@ -15408,6 +19142,11 @@ def list_namespaced_endpoints_with_http_info(self, namespace, **kwargs): # noqa # 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, @@ -15416,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 @@ -15430,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 @@ -15466,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() @@ -15517,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' ] ) @@ -15530,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 = {} @@ -15541,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 = {} @@ -15577,6 +19357,11 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 # 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, @@ -15585,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 @@ -15599,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 @@ -15635,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() @@ -15686,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' ] ) @@ -15699,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 = {} @@ -15710,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 = {} @@ -15746,6 +19572,11 @@ def list_namespaced_limit_range_with_http_info(self, namespace, **kwargs): # no # 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, @@ -15754,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 @@ -15768,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 @@ -15804,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() @@ -15855,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' ] ) @@ -15868,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 = {} @@ -15879,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 = {} @@ -15915,6 +19787,11 @@ def list_namespaced_persistent_volume_claim_with_http_info(self, namespace, **kw # 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, @@ -15923,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 @@ -15937,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 @@ -15973,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() @@ -16024,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' ] ) @@ -16037,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 = {} @@ -16048,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 = {} @@ -16084,6 +20002,11 @@ def list_namespaced_pod_with_http_info(self, namespace, **kwargs): # 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, @@ -16092,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 @@ -16106,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 @@ -16142,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() @@ -16193,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' ] ) @@ -16206,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 = {} @@ -16217,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 = {} @@ -16253,6 +20217,11 @@ def list_namespaced_pod_template_with_http_info(self, namespace, **kwargs): # n # 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, @@ -16261,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 @@ -16275,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 @@ -16311,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() @@ -16362,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' ] ) @@ -16375,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 = {} @@ -16386,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 = {} @@ -16422,6 +20432,11 @@ def list_namespaced_replication_controller_with_http_info(self, namespace, **kwa # 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, @@ -16430,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 @@ -16444,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 @@ -16480,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() @@ -16531,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' ] ) @@ -16544,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 = {} @@ -16555,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 = {} @@ -16591,6 +20647,11 @@ def list_namespaced_resource_quota_with_http_info(self, namespace, **kwargs): # # 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, @@ -16599,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 @@ -16613,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 @@ -16649,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() @@ -16700,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' ] ) @@ -16713,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 = {} @@ -16724,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 = {} @@ -16760,6 +20862,11 @@ def list_namespaced_secret_with_http_info(self, namespace, **kwargs): # noqa: E # 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, @@ -16768,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 @@ -16782,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 @@ -16818,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() @@ -16869,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' ] ) @@ -16882,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 = {} @@ -16893,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 = {} @@ -16929,6 +21077,11 @@ def list_namespaced_service_with_http_info(self, namespace, **kwargs): # noqa: # 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, @@ -16937,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 @@ -16951,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 @@ -16987,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() @@ -17038,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' ] ) @@ -17051,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 = {} @@ -17062,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 = {} @@ -17098,6 +21292,11 @@ def list_namespaced_service_account_with_http_info(self, namespace, **kwargs): # 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, @@ -17106,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 @@ -17120,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 @@ -17155,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() @@ -17204,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' ] ) @@ -17222,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 = {} @@ -17258,6 +21497,11 @@ def list_node_with_http_info(self, **kwargs): # 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, @@ -17266,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 @@ -17280,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 @@ -17315,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() @@ -17364,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' ] ) @@ -17382,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 = {} @@ -17418,6 +21702,11 @@ def list_persistent_volume_with_http_info(self, **kwargs): # 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, @@ -17426,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 @@ -17440,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 @@ -17475,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() @@ -17524,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' ] ) @@ -17542,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 = {} @@ -17578,6 +21907,11 @@ def list_persistent_volume_claim_for_all_namespaces_with_http_info(self, **kwarg # 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, @@ -17586,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 @@ -17600,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 @@ -17635,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() @@ -17684,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' ] ) @@ -17702,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 = {} @@ -17738,6 +22112,11 @@ def list_pod_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -17746,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 @@ -17760,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 @@ -17795,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() @@ -17844,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' ] ) @@ -17862,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 = {} @@ -17898,6 +22317,11 @@ def list_pod_template_for_all_namespaces_with_http_info(self, **kwargs): # noqa # 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, @@ -17906,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 @@ -17920,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 @@ -17955,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() @@ -18004,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' ] ) @@ -18022,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 = {} @@ -18058,6 +22522,11 @@ def list_replication_controller_for_all_namespaces_with_http_info(self, **kwargs # 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, @@ -18066,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 @@ -18080,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 @@ -18115,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() @@ -18164,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' ] ) @@ -18182,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 = {} @@ -18218,6 +22727,11 @@ def list_resource_quota_for_all_namespaces_with_http_info(self, **kwargs): # no # 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, @@ -18226,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 @@ -18240,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 @@ -18275,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() @@ -18324,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' ] ) @@ -18342,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 = {} @@ -18378,6 +22932,11 @@ def list_secret_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -18386,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 @@ -18400,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 @@ -18435,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() @@ -18484,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' ] ) @@ -18502,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 = {} @@ -18538,6 +23137,11 @@ def list_service_account_for_all_namespaces_with_http_info(self, **kwargs): # n # 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, @@ -18546,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 @@ -18560,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 @@ -18595,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() @@ -18644,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' ] ) @@ -18662,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 = {} @@ -18698,6 +23342,11 @@ def list_service_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 # 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, @@ -18706,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 @@ -18720,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 @@ -18751,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() @@ -18792,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' ] ) @@ -18805,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 = {} @@ -18820,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 = {} @@ -18844,12 +23523,22 @@ def patch_namespace_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -18858,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 @@ -18872,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 @@ -18903,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() @@ -18944,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' ] ) @@ -18957,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 = {} @@ -18972,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 = {} @@ -18996,12 +23715,22 @@ def patch_namespace_status_with_http_info(self, name, body, **kwargs): # noqa: ['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', 'application/apply-patch+cbor']) # 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, @@ -19010,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 @@ -19024,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 @@ -19056,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() @@ -19099,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' ] ) @@ -19112,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 = {} @@ -19133,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 = {} @@ -19157,12 +23917,22 @@ def patch_namespaced_config_map_with_http_info(self, name, namespace, body, **kw ['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', 'application/apply-patch+cbor']) # 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, @@ -19171,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 @@ -19185,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 @@ -19217,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() @@ -19260,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' ] ) @@ -19273,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 = {} @@ -19294,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 = {} @@ -19318,12 +24119,22 @@ def patch_namespaced_endpoints_with_http_info(self, name, namespace, body, **kwa ['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', 'application/apply-patch+cbor']) # 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, @@ -19332,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 @@ -19346,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 @@ -19378,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() @@ -19421,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' ] ) @@ -19434,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 = {} @@ -19455,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 = {} @@ -19479,12 +24321,22 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) ['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', 'application/apply-patch+cbor']) # 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, @@ -19493,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 @@ -19507,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 @@ -19539,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() @@ -19582,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' ] ) @@ -19595,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 = {} @@ -19616,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 = {} @@ -19640,12 +24523,22 @@ def patch_namespaced_limit_range_with_http_info(self, name, namespace, body, **k ['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', 'application/apply-patch+cbor']) # 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, @@ -19654,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 @@ -19668,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 @@ -19700,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() @@ -19743,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' ] ) @@ -19756,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 = {} @@ -19777,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 = {} @@ -19801,12 +24725,22 @@ def patch_namespaced_persistent_volume_claim_with_http_info(self, name, namespac ['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', 'application/apply-patch+cbor']) # 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, @@ -19815,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 @@ -19829,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 @@ -19861,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() @@ -19904,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' ] ) @@ -19917,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 = {} @@ -19938,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 = {} @@ -19962,12 +24927,22 @@ def patch_namespaced_persistent_volume_claim_status_with_http_info(self, name, n ['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', 'application/apply-patch+cbor']) # 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, @@ -19976,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 @@ -19990,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 @@ -20022,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() @@ -20065,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' ] ) @@ -20078,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 = {} @@ -20099,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 = {} @@ -20123,12 +25129,22 @@ def patch_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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, @@ -20137,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 @@ -20151,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 @@ -20183,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() @@ -20226,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' ] ) @@ -20239,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 = {} @@ -20260,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 = {} @@ -20284,12 +25331,22 @@ def patch_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespac ['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', 'application/apply-patch+cbor']) # 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, @@ -20298,13 +25355,14 @@ 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_resize(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_pod_resize # noqa: E501 @@ -20312,28 +25370,40 @@ def patch_namespaced_pod_resize(self, name, namespace, body, **kwargs): # noqa: 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_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_resize_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -20344,30 +25414,48 @@ def patch_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kw 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_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() @@ -20387,7 +25475,10 @@ def patch_namespaced_pod_resize_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' ] ) @@ -20400,16 +25491,13 @@ def patch_namespaced_pod_resize_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_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 + if self.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 + if self.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 = {} @@ -20421,18 +25509,18 @@ def patch_namespaced_pod_resize_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 = {} @@ -20445,12 +25533,22 @@ def patch_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kw ['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', 'application/apply-patch+cbor']) # 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}/resize', 'PATCH', path_params, @@ -20459,13 +25557,14 @@ def patch_namespaced_pod_resize_with_http_info(self, name, namespace, body, **kw 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 @@ -20473,28 +25572,40 @@ def patch_namespaced_pod_status(self, name, namespace, body, **kwargs): # noqa: 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_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 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 @@ -20505,30 +25616,48 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw 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_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 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() @@ -20548,7 +25677,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' ] ) @@ -20561,16 +25693,13 @@ def patch_namespaced_pod_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_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 `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 + if self.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 = {} @@ -20582,18 +25711,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 = {} @@ -20606,12 +25735,22 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw ['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', 'application/apply-patch+cbor']) # 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', path_params, @@ -20620,13 +25759,14 @@ def patch_namespaced_pod_status_with_http_info(self, name, namespace, body, **kw 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 @@ -20634,28 +25774,40 @@ def patch_namespaced_pod_template(self, name, namespace, body, **kwargs): # noq 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_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 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: 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.patch_namespaced_pod_template_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -20666,30 +25818,48 @@ def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, ** 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_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 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(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() @@ -20709,7 +25879,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' ] ) @@ -20722,16 +25895,13 @@ def patch_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 `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 + if self.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 + if self.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 = {} @@ -20743,18 +25913,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 = {} @@ -20767,12 +25937,22 @@ def patch_namespaced_pod_template_with_http_info(self, name, namespace, body, ** ['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', 'application/apply-patch+cbor']) # 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}/podtemplates/{name}', 'PATCH', path_params, @@ -20781,13 +25961,14 @@ def patch_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 patch_namespaced_replication_controller(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_replication_controller # noqa: E501 @@ -20795,28 +25976,40 @@ def patch_namespaced_replication_controller(self, name, namespace, body, **kwarg 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(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_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -20827,30 +26020,48 @@ def patch_namespaced_replication_controller_with_http_info(self, name, namespace 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_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() @@ -20870,7 +26081,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' ] ) @@ -20883,16 +26097,13 @@ def patch_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 `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 + if self.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 + if self.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 = {} @@ -20904,18 +26115,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 = {} @@ -20928,12 +26139,22 @@ def patch_namespaced_replication_controller_with_http_info(self, name, namespace ['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', 'application/apply-patch+cbor']) # 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, @@ -20942,13 +26163,14 @@ def patch_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 patch_namespaced_replication_controller_scale(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_replication_controller_scale # noqa: E501 @@ -20956,28 +26178,40 @@ def patch_namespaced_replication_controller_scale(self, name, namespace, body, * 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 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_replication_controller_scale_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -20988,30 +26222,48 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam 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 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() @@ -21031,7 +26283,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' ] ) @@ -21044,16 +26299,13 @@ def patch_namespaced_replication_controller_scale_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_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 `patch_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 `patch_namespaced_replication_controller_scale`") # noqa: E501 collection_formats = {} @@ -21065,18 +26317,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 = {} @@ -21089,12 +26341,22 @@ def patch_namespaced_replication_controller_scale_with_http_info(self, name, nam ['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', 'application/apply-patch+cbor']) # 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( '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale', 'PATCH', path_params, @@ -21103,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 @@ -21117,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 @@ -21149,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() @@ -21192,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' ] ) @@ -21205,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 = {} @@ -21226,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 = {} @@ -21250,12 +26543,22 @@ def patch_namespaced_replication_controller_status_with_http_info(self, name, na ['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', 'application/apply-patch+cbor']) # 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, @@ -21264,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 @@ -21278,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 @@ -21310,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() @@ -21353,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' ] ) @@ -21366,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 = {} @@ -21387,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 = {} @@ -21411,12 +26745,22 @@ def patch_namespaced_resource_quota_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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, @@ -21425,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 @@ -21439,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 @@ -21471,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() @@ -21514,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' ] ) @@ -21527,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 = {} @@ -21548,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 = {} @@ -21572,12 +26947,22 @@ def patch_namespaced_resource_quota_status_with_http_info(self, name, namespace, ['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', 'application/apply-patch+cbor']) # 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, @@ -21586,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 @@ -21600,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 @@ -21632,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() @@ -21675,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' ] ) @@ -21688,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 = {} @@ -21709,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 = {} @@ -21733,12 +27149,22 @@ def patch_namespaced_secret_with_http_info(self, name, namespace, body, **kwargs ['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', 'application/apply-patch+cbor']) # 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, @@ -21747,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 @@ -21761,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 @@ -21793,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() @@ -21836,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' ] ) @@ -21849,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 = {} @@ -21870,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 = {} @@ -21894,12 +27351,22 @@ def patch_namespaced_service_with_http_info(self, name, namespace, body, **kwarg ['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', 'application/apply-patch+cbor']) # 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, @@ -21908,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 @@ -21922,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 @@ -21954,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() @@ -21997,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' ] ) @@ -22010,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 = {} @@ -22031,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 = {} @@ -22055,12 +27553,22 @@ def patch_namespaced_service_account_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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, @@ -22069,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 @@ -22083,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 @@ -22115,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() @@ -22158,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' ] ) @@ -22171,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 = {} @@ -22192,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 = {} @@ -22216,12 +27755,22 @@ def patch_namespaced_service_status_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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, @@ -22230,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 @@ -22244,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 @@ -22275,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() @@ -22316,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' ] ) @@ -22329,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 = {} @@ -22344,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 = {} @@ -22368,12 +27947,22 @@ def patch_node_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -22382,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 @@ -22396,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 @@ -22427,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() @@ -22468,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' ] ) @@ -22481,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 = {} @@ -22496,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 = {} @@ -22520,12 +28139,22 @@ def patch_node_status_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -22534,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 @@ -22548,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 @@ -22579,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() @@ -22620,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' ] ) @@ -22633,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 = {} @@ -22648,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 = {} @@ -22672,12 +28331,22 @@ def patch_persistent_volume_with_http_info(self, name, body, **kwargs): # noqa: ['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', 'application/apply-patch+cbor']) # 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, @@ -22686,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 @@ -22700,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 @@ -22731,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() @@ -22772,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' ] ) @@ -22785,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 = {} @@ -22800,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 = {} @@ -22824,12 +28523,22 @@ def patch_persistent_volume_status_with_http_info(self, name, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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, @@ -22838,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 @@ -22852,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 @@ -22878,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() @@ -22909,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' ] ) @@ -22922,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 = {} @@ -22933,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 = {} @@ -22949,6 +28679,11 @@ def read_component_status_with_http_info(self, name, **kwargs): # 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, @@ -22957,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 @@ -22971,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 @@ -22997,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() @@ -23028,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' ] ) @@ -23041,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 = {} @@ -23052,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 = {} @@ -23068,6 +28824,11 @@ def read_namespace_with_http_info(self, name, **kwargs): # 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, @@ -23076,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 @@ -23090,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 @@ -23116,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() @@ -23147,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' ] ) @@ -23160,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 = {} @@ -23171,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 = {} @@ -23187,6 +28969,11 @@ def read_namespace_status_with_http_info(self, name, **kwargs): # 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, @@ -23195,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 @@ -23209,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 @@ -23236,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() @@ -23269,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' ] ) @@ -23282,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 = {} @@ -23299,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 = {} @@ -23315,6 +29124,11 @@ def read_namespaced_config_map_with_http_info(self, name, namespace, **kwargs): # 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, @@ -23323,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 @@ -23337,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 @@ -23364,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() @@ -23397,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' ] ) @@ -23410,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 = {} @@ -23427,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 = {} @@ -23443,6 +29279,11 @@ def read_namespaced_endpoints_with_http_info(self, name, namespace, **kwargs): # 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, @@ -23451,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 @@ -23465,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 @@ -23492,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() @@ -23525,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' ] ) @@ -23538,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 = {} @@ -23555,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 = {} @@ -23571,6 +29434,11 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no # 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, @@ -23579,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 @@ -23593,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 @@ -23620,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() @@ -23653,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' ] ) @@ -23666,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 = {} @@ -23683,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 = {} @@ -23699,6 +29589,11 @@ def read_namespaced_limit_range_with_http_info(self, name, namespace, **kwargs): # 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, @@ -23707,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 @@ -23721,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 @@ -23748,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() @@ -23781,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' ] ) @@ -23794,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 = {} @@ -23811,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 = {} @@ -23827,6 +29744,11 @@ def read_namespaced_persistent_volume_claim_with_http_info(self, name, namespace # 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, @@ -23835,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 @@ -23849,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 @@ -23876,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() @@ -23909,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' ] ) @@ -23922,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 = {} @@ -23939,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 = {} @@ -23955,6 +29899,11 @@ def read_namespaced_persistent_volume_claim_status_with_http_info(self, name, na # 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, @@ -23963,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 @@ -23977,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 @@ -24004,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() @@ -24037,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' ] ) @@ -24050,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 = {} @@ -24067,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 = {} @@ -24083,6 +30054,11 @@ def read_namespaced_pod_with_http_info(self, name, namespace, **kwargs): # noqa # 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, @@ -24091,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 @@ -24105,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 @@ -24132,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() @@ -24165,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' ] ) @@ -24178,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 = {} @@ -24195,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 = {} @@ -24211,6 +30209,11 @@ def read_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namespace # 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, @@ -24219,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 @@ -24233,32 +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 str 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\". - :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. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". - :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 @@ -24269,34 +30289,56 @@ 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) >>> 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 str 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\". - :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. Note that when \"TailLines\" is specified, \"Stream\" can only be set to nil or \"All\". - :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 _return_http_data_only: response data without head status code and headers + :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. + :type _preload_content: bool, optional :param _request_timeout: timeout setting for this 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() @@ -24320,7 +30362,10 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24333,12 +30378,10 @@ def read_namespaced_pod_log_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_log`") # noqa: E501 # verify the required parameter 'namespace' is set - if self.api_client.client_side_validation and ('namespace' not in local_var_params or # noqa: E501 - local_var_params['namespace'] is None): # noqa: E501 + if self.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 = {} @@ -24350,28 +30393,28 @@ 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 + if local_var_params.get('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 + if local_var_params.get('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 + 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 'limit_bytes' in local_var_params and local_var_params['limit_bytes'] is not None: # 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 'pretty' in local_var_params and local_var_params['pretty'] is not None: # 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 + if local_var_params.get('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 + if local_var_params.get('since_seconds') is not None: # noqa: E501 query_params.append(('sinceSeconds', local_var_params['since_seconds'])) # noqa: E501 - if 'stream' in local_var_params and local_var_params['stream'] is not None: # noqa: E501 + if local_var_params.get('stream') is not None: # noqa: E501 query_params.append(('stream', local_var_params['stream'])) # noqa: E501 - if 'tail_lines' in local_var_params and local_var_params['tail_lines'] is not None: # 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 'timestamps' in local_var_params and local_var_params['timestamps'] is not None: # 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 = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -24384,6 +30427,11 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -24392,13 +30440,14 @@ def read_namespaced_pod_log_with_http_info(self, name, namespace, **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 read_namespaced_pod_resize(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_resize # noqa: E501 @@ -24406,23 +30455,30 @@ def read_namespaced_pod_resize(self, name, namespace, **kwargs): # 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 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_resize_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -24433,25 +30489,38 @@ def read_namespaced_pod_resize_with_http_info(self, name, namespace, **kwargs): 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 pretty: If 'true', then 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() @@ -24466,7 +30535,10 @@ def read_namespaced_pod_resize_with_http_info(self, name, namespace, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -24479,12 +30551,10 @@ def read_namespaced_pod_resize_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_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 + if self.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 = {} @@ -24496,10 +30566,10 @@ def read_namespaced_pod_resize_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 = {} @@ -24512,6 +30582,11 @@ def read_namespaced_pod_resize_with_http_info(self, name, namespace, **kwargs): # 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}/resize', 'GET', path_params, @@ -24520,13 +30595,14 @@ def read_namespaced_pod_resize_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_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod_status # noqa: E501 @@ -24534,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 @@ -24561,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() @@ -24594,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' ] ) @@ -24607,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 = {} @@ -24624,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 = {} @@ -24640,6 +30737,11 @@ def read_namespaced_pod_status_with_http_info(self, name, namespace, **kwargs): # 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, @@ -24648,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 @@ -24662,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 @@ -24689,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() @@ -24722,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' ] ) @@ -24735,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 = {} @@ -24752,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 = {} @@ -24768,6 +30892,11 @@ def read_namespaced_pod_template_with_http_info(self, name, namespace, **kwargs) # 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, @@ -24776,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 @@ -24790,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 @@ -24817,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() @@ -24850,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' ] ) @@ -24863,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 = {} @@ -24880,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 = {} @@ -24896,6 +31047,11 @@ def read_namespaced_replication_controller_with_http_info(self, name, namespace, # 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, @@ -24904,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 @@ -24918,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 @@ -24945,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() @@ -24978,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' ] ) @@ -24991,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 = {} @@ -25008,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 = {} @@ -25024,6 +31202,11 @@ def read_namespaced_replication_controller_scale_with_http_info(self, name, name # 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, @@ -25032,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 @@ -25046,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 @@ -25073,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() @@ -25106,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' ] ) @@ -25119,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 = {} @@ -25136,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 = {} @@ -25152,6 +31357,11 @@ def read_namespaced_replication_controller_status_with_http_info(self, name, nam # 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, @@ -25160,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 @@ -25174,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 @@ -25201,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() @@ -25234,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' ] ) @@ -25247,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 = {} @@ -25264,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 = {} @@ -25280,6 +31512,11 @@ def read_namespaced_resource_quota_with_http_info(self, name, namespace, **kwarg # 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, @@ -25288,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 @@ -25302,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 @@ -25329,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() @@ -25362,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' ] ) @@ -25375,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 = {} @@ -25392,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 = {} @@ -25408,6 +31667,11 @@ def read_namespaced_resource_quota_status_with_http_info(self, name, namespace, # 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, @@ -25416,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 @@ -25430,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 @@ -25457,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() @@ -25490,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' ] ) @@ -25503,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 = {} @@ -25520,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 = {} @@ -25536,6 +31822,11 @@ def read_namespaced_secret_with_http_info(self, name, namespace, **kwargs): # n # 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, @@ -25544,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 @@ -25558,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 @@ -25585,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() @@ -25618,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' ] ) @@ -25631,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 = {} @@ -25648,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 = {} @@ -25664,6 +31977,11 @@ def read_namespaced_service_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -25672,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 @@ -25686,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 @@ -25713,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() @@ -25746,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' ] ) @@ -25759,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 = {} @@ -25776,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 = {} @@ -25792,6 +32132,11 @@ def read_namespaced_service_account_with_http_info(self, name, namespace, **kwar # 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, @@ -25800,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 @@ -25814,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 @@ -25841,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() @@ -25874,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' ] ) @@ -25887,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 = {} @@ -25904,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 = {} @@ -25920,6 +32287,11 @@ def read_namespaced_service_status_with_http_info(self, name, namespace, **kwarg # 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, @@ -25928,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 @@ -25942,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 @@ -25968,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() @@ -25999,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' ] ) @@ -26012,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 = {} @@ -26023,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 = {} @@ -26039,6 +32432,11 @@ def read_node_with_http_info(self, name, **kwargs): # 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, @@ -26047,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 @@ -26061,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 @@ -26087,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() @@ -26118,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' ] ) @@ -26131,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 = {} @@ -26142,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 = {} @@ -26158,6 +32577,11 @@ def read_node_status_with_http_info(self, name, **kwargs): # 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, @@ -26166,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 @@ -26180,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 @@ -26206,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() @@ -26237,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' ] ) @@ -26250,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 = {} @@ -26261,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 = {} @@ -26277,6 +32722,11 @@ def read_persistent_volume_with_http_info(self, name, **kwargs): # 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, @@ -26285,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 @@ -26299,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 @@ -26325,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() @@ -26356,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' ] ) @@ -26369,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 = {} @@ -26380,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 = {} @@ -26396,6 +32867,11 @@ def read_persistent_volume_status_with_http_info(self, name, **kwargs): # noqa: # 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, @@ -26404,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 @@ -26418,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 @@ -26448,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() @@ -26487,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' ] ) @@ -26500,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 = {} @@ -26515,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 = {} @@ -26539,6 +33043,12 @@ def replace_namespace_with_http_info(self, name, body, **kwargs): # 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, @@ -26547,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 @@ -26561,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 @@ -26591,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() @@ -26630,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' ] ) @@ -26643,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 = {} @@ -26658,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 = {} @@ -26682,6 +33220,12 @@ def replace_namespace_finalize_with_http_info(self, name, body, **kwargs): # no # 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, @@ -26690,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 @@ -26704,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 @@ -26734,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() @@ -26773,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' ] ) @@ -26786,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 = {} @@ -26801,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 = {} @@ -26825,6 +33397,12 @@ def replace_namespace_status_with_http_info(self, name, body, **kwargs): # noqa # 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, @@ -26833,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 @@ -26847,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 @@ -26878,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() @@ -26919,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' ] ) @@ -26932,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 = {} @@ -26953,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 = {} @@ -26977,6 +33584,12 @@ def replace_namespaced_config_map_with_http_info(self, name, namespace, body, ** # 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, @@ -26985,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 @@ -26999,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 @@ -27030,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() @@ -27071,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' ] ) @@ -27084,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 = {} @@ -27105,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 = {} @@ -27129,6 +33771,12 @@ def replace_namespaced_endpoints_with_http_info(self, name, namespace, body, **k # 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, @@ -27137,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 @@ -27151,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 @@ -27182,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() @@ -27223,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' ] ) @@ -27236,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 = {} @@ -27257,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 = {} @@ -27281,6 +33958,12 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg # 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, @@ -27289,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 @@ -27303,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 @@ -27334,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() @@ -27375,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' ] ) @@ -27388,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 = {} @@ -27409,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 = {} @@ -27433,6 +34145,12 @@ def replace_namespaced_limit_range_with_http_info(self, name, namespace, body, * # 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, @@ -27441,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 @@ -27455,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 @@ -27486,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() @@ -27527,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' ] ) @@ -27540,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 = {} @@ -27561,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 = {} @@ -27585,6 +34332,12 @@ def replace_namespaced_persistent_volume_claim_with_http_info(self, name, namesp # 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, @@ -27593,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 @@ -27607,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 @@ -27638,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() @@ -27679,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' ] ) @@ -27692,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 = {} @@ -27713,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 = {} @@ -27737,6 +34519,12 @@ def replace_namespaced_persistent_volume_claim_status_with_http_info(self, name, # 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, @@ -27745,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 @@ -27759,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 @@ -27790,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() @@ -27831,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' ] ) @@ -27844,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 = {} @@ -27865,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 = {} @@ -27889,6 +34706,12 @@ def replace_namespaced_pod_with_http_info(self, name, namespace, body, **kwargs) # 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, @@ -27897,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 @@ -27911,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 @@ -27942,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() @@ -27983,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' ] ) @@ -27996,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 = {} @@ -28017,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 = {} @@ -28041,6 +34893,12 @@ def replace_namespaced_pod_ephemeralcontainers_with_http_info(self, name, namesp # 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, @@ -28049,13 +34907,14 @@ 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) + 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 @@ -28063,27 +34922,38 @@ def replace_namespaced_pod_resize(self, name, namespace, body, **kwargs): # noq 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 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_resize_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -28094,29 +34964,46 @@ def replace_namespaced_pod_resize_with_http_info(self, name, namespace, body, ** 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 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() @@ -28135,7 +35022,10 @@ def replace_namespaced_pod_resize_with_http_info(self, name, namespace, body, ** 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -28148,16 +35038,13 @@ def replace_namespaced_pod_resize_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_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 + if self.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 ('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_resize`") # noqa: E501 collection_formats = {} @@ -28169,16 +35056,16 @@ def replace_namespaced_pod_resize_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 = {} @@ -28193,6 +35080,12 @@ def replace_namespaced_pod_resize_with_http_info(self, name, namespace, body, ** # 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, @@ -28201,13 +35094,14 @@ def replace_namespaced_pod_resize_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_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_pod_status # noqa: E501 @@ -28215,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 @@ -28246,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() @@ -28287,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' ] ) @@ -28300,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 = {} @@ -28321,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 = {} @@ -28345,6 +35267,12 @@ def replace_namespaced_pod_status_with_http_info(self, name, namespace, body, ** # 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, @@ -28353,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 @@ -28367,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 @@ -28398,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() @@ -28439,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' ] ) @@ -28452,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 = {} @@ -28473,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 = {} @@ -28497,6 +35454,12 @@ def replace_namespaced_pod_template_with_http_info(self, name, namespace, body, # 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, @@ -28505,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 @@ -28519,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 @@ -28550,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() @@ -28591,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' ] ) @@ -28604,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 = {} @@ -28625,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 = {} @@ -28649,6 +35641,12 @@ def replace_namespaced_replication_controller_with_http_info(self, name, namespa # 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, @@ -28657,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 @@ -28671,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 @@ -28702,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() @@ -28743,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' ] ) @@ -28756,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 = {} @@ -28777,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 = {} @@ -28801,6 +35828,12 @@ def replace_namespaced_replication_controller_scale_with_http_info(self, name, n # 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, @@ -28809,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 @@ -28823,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 @@ -28854,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() @@ -28895,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' ] ) @@ -28908,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 = {} @@ -28929,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 = {} @@ -28953,6 +36015,12 @@ def replace_namespaced_replication_controller_status_with_http_info(self, name, # 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, @@ -28961,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 @@ -28975,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 @@ -29006,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() @@ -29047,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' ] ) @@ -29060,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 = {} @@ -29081,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 = {} @@ -29105,6 +36202,12 @@ def replace_namespaced_resource_quota_with_http_info(self, name, namespace, body # 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, @@ -29113,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 @@ -29127,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 @@ -29158,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() @@ -29199,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' ] ) @@ -29212,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 = {} @@ -29233,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 = {} @@ -29257,6 +36389,12 @@ def replace_namespaced_resource_quota_status_with_http_info(self, name, namespac # 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, @@ -29265,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 @@ -29279,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 @@ -29310,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() @@ -29351,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' ] ) @@ -29364,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 = {} @@ -29385,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 = {} @@ -29409,6 +36576,12 @@ def replace_namespaced_secret_with_http_info(self, name, namespace, body, **kwar # 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, @@ -29417,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 @@ -29431,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 @@ -29462,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() @@ -29503,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' ] ) @@ -29516,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 = {} @@ -29537,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 = {} @@ -29561,6 +36763,12 @@ def replace_namespaced_service_with_http_info(self, name, namespace, body, **kwa # 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, @@ -29569,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 @@ -29583,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 @@ -29614,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() @@ -29655,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' ] ) @@ -29668,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 = {} @@ -29689,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 = {} @@ -29713,6 +36950,12 @@ def replace_namespaced_service_account_with_http_info(self, name, namespace, bod # 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, @@ -29721,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 @@ -29735,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 @@ -29766,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() @@ -29807,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' ] ) @@ -29820,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 = {} @@ -29841,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 = {} @@ -29865,6 +37137,12 @@ def replace_namespaced_service_status_with_http_info(self, name, namespace, body # 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, @@ -29873,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 @@ -29887,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 @@ -29917,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() @@ -29956,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' ] ) @@ -29969,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 = {} @@ -29984,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 = {} @@ -30008,6 +37314,12 @@ def replace_node_with_http_info(self, name, body, **kwargs): # 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, @@ -30016,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 @@ -30030,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 @@ -30060,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() @@ -30099,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' ] ) @@ -30112,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 = {} @@ -30127,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 = {} @@ -30151,6 +37491,12 @@ def replace_node_status_with_http_info(self, name, body, **kwargs): # noqa: E50 # 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, @@ -30159,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 @@ -30173,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 @@ -30203,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() @@ -30242,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' ] ) @@ -30255,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 = {} @@ -30270,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 = {} @@ -30294,6 +37668,12 @@ def replace_persistent_volume_with_http_info(self, name, body, **kwargs): # noq # 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, @@ -30302,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 @@ -30316,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 @@ -30346,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() @@ -30385,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' ] ) @@ -30398,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 = {} @@ -30413,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 = {} @@ -30437,6 +37845,12 @@ def replace_persistent_volume_status_with_http_info(self, name, body, **kwargs): # 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, @@ -30445,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 9a9ef0012e..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.34 + 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,32 +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 str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :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 @@ -742,34 +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 str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. - :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() @@ -793,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' ] ) @@ -806,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 = {} @@ -835,22 +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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -865,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, @@ -873,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 @@ -887,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 @@ -921,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() @@ -968,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' ] ) @@ -981,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 = {} @@ -1016,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 = {} @@ -1040,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, @@ -1048,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 @@ -1062,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 @@ -1088,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() @@ -1119,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' ] ) @@ -1132,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 = {} @@ -1150,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 = {} @@ -1163,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, @@ -1171,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 @@ -1185,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 @@ -1213,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() @@ -1248,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' ] ) @@ -1261,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 = {} @@ -1291,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 = {} @@ -1304,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, @@ -1312,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 @@ -1326,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 @@ -1354,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() @@ -1389,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' ] ) @@ -1402,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 = {} @@ -1432,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 = {} @@ -1445,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, @@ -1453,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 @@ -1467,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 @@ -1495,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() @@ -1530,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' ] ) @@ -1543,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 = {} @@ -1573,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 = {} @@ -1586,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, @@ -1594,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 @@ -1608,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 @@ -1637,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() @@ -1674,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' ] ) @@ -1687,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 = {} @@ -1723,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 = {} @@ -1736,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, @@ -1744,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 @@ -1758,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 @@ -1787,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() @@ -1824,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' ] ) @@ -1837,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 = {} @@ -1873,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 = {} @@ -1886,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, @@ -1894,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 @@ -1908,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 @@ -1937,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() @@ -1974,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' ] ) @@ -1987,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 = {} @@ -2023,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 = {} @@ -2036,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, @@ -2044,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 @@ -2058,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 @@ -2095,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() @@ -2148,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' ] ) @@ -2161,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 = {} @@ -2184,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 = {} @@ -2218,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, @@ -2226,13 +2690,14 @@ 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) + 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 @@ -2240,33 +2705,50 @@ def list_custom_object_for_all_namespaces(self, group, version, resource_plural, 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 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 resource_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 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: 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_custom_object_for_all_namespaces_with_http_info(group, version, resource_plural, **kwargs) # noqa: E501 @@ -2277,35 +2759,58 @@ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, r 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 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 resource_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 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. - :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() @@ -2330,7 +2835,10 @@ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, r 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2343,16 +2851,13 @@ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, r 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_custom_object_for_all_namespaces`") # 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_custom_object_for_all_namespaces`") # noqa: E501 # verify the required parameter 'resource_plural' is set - if self.api_client.client_side_validation and ('resource_plural' not in local_var_params or # noqa: E501 - local_var_params['resource_plural'] is None): # noqa: E501 + 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 = {} @@ -2366,28 +2871,28 @@ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, r path_params['resource_plural'] = local_var_params['resource_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 = {} @@ -2400,6 +2905,11 @@ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, r # 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, @@ -2408,13 +2918,14 @@ def list_custom_object_for_all_namespaces_with_http_info(self, group, version, r 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_namespaced_custom_object(self, group, version, namespace, plural, **kwargs): # noqa: E501 """list_namespaced_custom_object # noqa: E501 @@ -2422,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 @@ -2460,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() @@ -2515,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' ] ) @@ -2528,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 = {} @@ -2557,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 = {} @@ -2591,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, @@ -2599,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 @@ -2613,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 @@ -2646,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() @@ -2691,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' ] ) @@ -2704,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 = {} @@ -2737,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 = {} @@ -2759,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, @@ -2773,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 @@ -2787,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 @@ -2820,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() @@ -2865,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' ] ) @@ -2878,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 = {} @@ -2911,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 = {} @@ -2933,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, @@ -2947,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 @@ -2961,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 @@ -2994,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() @@ -3039,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' ] ) @@ -3052,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 = {} @@ -3085,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 = {} @@ -3107,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, @@ -3121,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 @@ -3135,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 @@ -3169,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() @@ -3216,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' ] ) @@ -3229,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 = {} @@ -3268,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 = {} @@ -3290,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, @@ -3304,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 @@ -3318,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 @@ -3352,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() @@ -3399,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' ] ) @@ -3412,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 = {} @@ -3451,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 = {} @@ -3473,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, @@ -3487,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 @@ -3501,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 @@ -3535,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() @@ -3582,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' ] ) @@ -3595,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 = {} @@ -3634,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 = {} @@ -3656,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, @@ -3670,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 @@ -3684,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 @@ -3716,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() @@ -3759,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' ] ) @@ -3772,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 = {} @@ -3805,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 = {} @@ -3827,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, @@ -3835,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 @@ -3849,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 @@ -3881,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() @@ -3924,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' ] ) @@ -3937,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 = {} @@ -3970,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 = {} @@ -3992,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, @@ -4000,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 @@ -4014,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 @@ -4046,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() @@ -4089,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' ] ) @@ -4102,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 = {} @@ -4135,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 = {} @@ -4157,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, @@ -4165,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 @@ -4179,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 @@ -4212,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() @@ -4257,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' ] ) @@ -4270,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 = {} @@ -4309,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 = {} @@ -4331,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, @@ -4339,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 @@ -4353,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 @@ -4386,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() @@ -4431,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' ] ) @@ -4444,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 = {} @@ -4483,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 = {} @@ -4505,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, @@ -4513,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 @@ -4527,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 @@ -4560,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() @@ -4605,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' ] ) @@ -4618,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 = {} @@ -4657,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 = {} @@ -4679,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, @@ -4687,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 80c0566b3e..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.34 + 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 9afa99000b..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_endpoint_slice_with_http_info(self, namespace, body, **kwa # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -225,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,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' ] ) @@ -297,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 = {} @@ -308,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_endpoint_slice_with_http_info(self, namespace, # 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, @@ -360,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 @@ -374,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -407,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -452,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' ] ) @@ -465,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 = {} @@ -482,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwa # 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, @@ -518,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 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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 @@ -637,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 @@ -672,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() @@ -721,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' ] ) @@ -739,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 = {} @@ -775,6 +966,11 @@ def list_endpoint_slice_for_all_namespaces_with_http_info(self, **kwargs): # no # 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, @@ -783,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 @@ -797,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 @@ -833,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() @@ -884,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' ] ) @@ -897,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 = {} @@ -908,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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_endpoint_slice_with_http_info(self, namespace, **kwargs): # # 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, @@ -952,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 @@ -966,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 @@ -998,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() @@ -1041,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' ] ) @@ -1054,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 = {} @@ -1075,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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_endpoint_slice_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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, @@ -1113,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 @@ -1127,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 @@ -1154,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() @@ -1187,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' ] ) @@ -1200,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 = {} @@ -1217,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 = {} @@ -1233,6 +1538,11 @@ def read_namespaced_endpoint_slice_with_http_info(self, name, namespace, **kwarg # 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, @@ -1241,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 @@ -1255,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 @@ -1286,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() @@ -1327,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' ] ) @@ -1340,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 = {} @@ -1361,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 = {} @@ -1385,6 +1724,12 @@ def replace_namespaced_endpoint_slice_with_http_info(self, name, namespace, body # 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, @@ -1393,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 2e66c5b36e..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.34 + 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 dcc4df783a..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_event_with_http_info(self, namespace, body, **kwargs): # # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -225,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,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' ] ) @@ -297,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 = {} @@ -308,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_event_with_http_info(self, namespace, **kwargs) # 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, @@ -360,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 @@ -374,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -407,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -452,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' ] ) @@ -465,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 = {} @@ -482,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_event_with_http_info(self, name, namespace, **kwargs): # # 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, @@ -518,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 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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 @@ -637,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 @@ -672,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() @@ -721,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' ] ) @@ -739,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 = {} @@ -775,6 +966,11 @@ def list_event_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -783,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 @@ -797,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 @@ -833,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() @@ -884,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' ] ) @@ -897,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 = {} @@ -908,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 = {} @@ -944,6 +1181,11 @@ def list_namespaced_event_with_http_info(self, namespace, **kwargs): # noqa: E5 # 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, @@ -952,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 @@ -966,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 @@ -998,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() @@ -1041,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' ] ) @@ -1054,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 = {} @@ -1075,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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_event_with_http_info(self, name, namespace, body, **kwargs) ['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', 'application/apply-patch+cbor']) # 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, @@ -1113,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 @@ -1127,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 @@ -1154,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() @@ -1187,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' ] ) @@ -1200,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 = {} @@ -1217,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 = {} @@ -1233,6 +1538,11 @@ def read_namespaced_event_with_http_info(self, name, namespace, **kwargs): # no # 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, @@ -1241,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 @@ -1255,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 @@ -1286,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() @@ -1327,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' ] ) @@ -1340,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 = {} @@ -1361,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 = {} @@ -1385,6 +1724,12 @@ def replace_namespaced_event_with_http_info(self, name, namespace, body, **kwarg # 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, @@ -1393,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 600a2ffee4..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.34 + 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 ce1ce64876..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_flow_schema_with_http_info(self, body, **kwargs): # 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 = {} @@ -288,6 +348,13 @@ def create_priority_level_configuration_with_http_info(self, body, **kwargs): # # 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,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -349,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -406,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' ] ) @@ -424,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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,6 +583,11 @@ def delete_collection_flow_schema_with_http_info(self, **kwargs): # 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, @@ -476,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 @@ -490,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -529,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -586,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' ] ) @@ -604,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -648,6 +816,11 @@ def delete_collection_priority_level_configuration_with_http_info(self, **kwargs # 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, @@ -656,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 @@ -670,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -702,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -745,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' ] ) @@ -758,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 = {} @@ -769,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -797,6 +1003,12 @@ def delete_flow_schema_with_http_info(self, name, **kwargs): # 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, @@ -805,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 @@ -819,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -851,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -894,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' ] ) @@ -907,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 = {} @@ -918,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -946,6 +1191,12 @@ def delete_priority_level_configuration_with_http_info(self, name, **kwargs): # # 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, @@ -954,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 @@ -968,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 @@ -992,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() @@ -1019,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' ] ) @@ -1038,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 = {} @@ -1051,6 +1320,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -1059,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 @@ -1073,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 @@ -1108,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() @@ -1157,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' ] ) @@ -1175,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 = {} @@ -1211,6 +1525,11 @@ def list_flow_schema_with_http_info(self, **kwargs): # 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, @@ -1219,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 @@ -1233,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 @@ -1268,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() @@ -1317,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' ] ) @@ -1335,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 = {} @@ -1371,6 +1730,11 @@ def list_priority_level_configuration_with_http_info(self, **kwargs): # noqa: E # 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, @@ -1379,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 @@ -1393,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 @@ -1424,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() @@ -1465,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' ] ) @@ -1478,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 = {} @@ -1493,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 = {} @@ -1517,12 +1911,22 @@ def patch_flow_schema_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -1531,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 @@ -1545,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 @@ -1576,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() @@ -1617,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' ] ) @@ -1630,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 = {} @@ -1645,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 = {} @@ -1669,12 +2103,22 @@ def patch_flow_schema_status_with_http_info(self, name, body, **kwargs): # noqa ['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', 'application/apply-patch+cbor']) # 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, @@ -1683,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 @@ -1697,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 @@ -1728,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() @@ -1769,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' ] ) @@ -1782,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 = {} @@ -1797,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 = {} @@ -1821,12 +2295,22 @@ def patch_priority_level_configuration_with_http_info(self, name, body, **kwargs ['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', 'application/apply-patch+cbor']) # 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, @@ -1835,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 @@ -1849,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 @@ -1880,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() @@ -1921,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' ] ) @@ -1934,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 = {} @@ -1949,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 = {} @@ -1973,12 +2487,22 @@ def patch_priority_level_configuration_status_with_http_info(self, name, body, * ['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', 'application/apply-patch+cbor']) # 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, @@ -1987,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 @@ -2001,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 @@ -2027,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() @@ -2058,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' ] ) @@ -2071,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 = {} @@ -2082,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 = {} @@ -2098,6 +2643,11 @@ def read_flow_schema_with_http_info(self, name, **kwargs): # 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, @@ -2106,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 @@ -2120,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 @@ -2146,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() @@ -2177,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' ] ) @@ -2190,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 = {} @@ -2201,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 = {} @@ -2217,6 +2788,11 @@ def read_flow_schema_status_with_http_info(self, name, **kwargs): # 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, @@ -2225,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 @@ -2239,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 @@ -2265,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() @@ -2296,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' ] ) @@ -2309,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 = {} @@ -2320,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 = {} @@ -2336,6 +2933,11 @@ def read_priority_level_configuration_with_http_info(self, name, **kwargs): # n # 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, @@ -2344,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 @@ -2358,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 @@ -2384,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() @@ -2415,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' ] ) @@ -2428,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 = {} @@ -2439,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 = {} @@ -2455,6 +3078,11 @@ def read_priority_level_configuration_status_with_http_info(self, name, **kwargs # 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, @@ -2463,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 @@ -2477,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 @@ -2507,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() @@ -2546,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' ] ) @@ -2559,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 = {} @@ -2574,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 = {} @@ -2598,6 +3254,12 @@ def replace_flow_schema_with_http_info(self, name, body, **kwargs): # noqa: E50 # 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, @@ -2606,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 @@ -2620,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 @@ -2650,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() @@ -2689,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' ] ) @@ -2702,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 = {} @@ -2717,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 = {} @@ -2741,6 +3431,12 @@ def replace_flow_schema_status_with_http_info(self, name, body, **kwargs): # no # 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, @@ -2749,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 @@ -2763,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 @@ -2793,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() @@ -2832,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' ] ) @@ -2845,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 = {} @@ -2860,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 = {} @@ -2884,6 +3608,12 @@ def replace_priority_level_configuration_with_http_info(self, name, body, **kwar # 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, @@ -2892,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 @@ -2906,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 @@ -2936,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() @@ -2975,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' ] ) @@ -2988,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 = {} @@ -3003,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 = {} @@ -3027,6 +3785,12 @@ def replace_priority_level_configuration_status_with_http_info(self, name, body, # 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, @@ -3035,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/internal_apiserver_api.py b/kubernetes/client/api/internal_apiserver_api.py index 624feaaaa7..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.34 + 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 fc8d167cd3..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_storage_version_with_http_info(self, body, **kwargs): # 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,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -215,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -272,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' ] ) @@ -290,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -334,6 +415,11 @@ def delete_collection_storage_version_with_http_info(self, **kwargs): # noqa: E # 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, @@ -342,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 @@ -356,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -388,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -431,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' ] ) @@ -444,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 = {} @@ -455,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -483,6 +602,12 @@ def delete_storage_version_with_http_info(self, name, **kwargs): # 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, @@ -491,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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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 @@ -610,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 @@ -645,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() @@ -694,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' ] ) @@ -712,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 = {} @@ -748,6 +936,11 @@ def list_storage_version_with_http_info(self, **kwargs): # 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, @@ -756,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 @@ -770,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 @@ -801,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() @@ -842,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' ] ) @@ -855,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 = {} @@ -870,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 = {} @@ -894,12 +1117,22 @@ def patch_storage_version_with_http_info(self, name, body, **kwargs): # noqa: E ['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', 'application/apply-patch+cbor']) # 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, @@ -908,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 @@ -922,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 @@ -953,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() @@ -994,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' ] ) @@ -1007,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 = {} @@ -1022,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 = {} @@ -1046,12 +1309,22 @@ def patch_storage_version_status_with_http_info(self, name, body, **kwargs): # ['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', 'application/apply-patch+cbor']) # 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, @@ -1060,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 @@ -1074,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 @@ -1100,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() @@ -1131,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' ] ) @@ -1144,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 = {} @@ -1155,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 = {} @@ -1171,6 +1465,11 @@ def read_storage_version_with_http_info(self, name, **kwargs): # 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, @@ -1179,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 @@ -1193,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 @@ -1219,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() @@ -1250,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' ] ) @@ -1263,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 = {} @@ -1274,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 = {} @@ -1290,6 +1610,11 @@ def read_storage_version_status_with_http_info(self, name, **kwargs): # noqa: E # 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, @@ -1298,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 @@ -1312,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 @@ -1342,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() @@ -1381,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' ] ) @@ -1394,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 = {} @@ -1409,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 = {} @@ -1433,6 +1786,12 @@ def replace_storage_version_with_http_info(self, name, body, **kwargs): # noqa: # 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, @@ -1441,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 @@ -1455,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 @@ -1485,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() @@ -1524,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' ] ) @@ -1537,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 = {} @@ -1552,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 = {} @@ -1576,6 +1963,12 @@ def replace_storage_version_status_with_http_info(self, name, body, **kwargs): # 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, @@ -1584,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 ecad1a124c..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.34 + 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 0b5c5dd493..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.34 + 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 b975921397..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_ingress_class_with_http_info(self, body, **kwargs): # 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,13 +195,14 @@ 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_ip_address(self, body, **kwargs): # noqa: E501 """create_ip_address # noqa: E501 @@ -176,25 +210,34 @@ def create_ip_address(self, body, **kwargs): # 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 V1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1IPAddress + :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_ip_address_with_http_info(body, **kwargs) # noqa: E501 @@ -205,27 +248,42 @@ def create_ip_address_with_http_info(self, body, **kwargs): # 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 V1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -242,7 +300,10 @@ def create_ip_address_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_ip_address_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_ip_address`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_ip_address_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 = {} @@ -288,6 +348,13 @@ def create_ip_address_with_http_info(self, body, **kwargs): # 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/ipaddresses', 'POST', path_params, @@ -296,13 +363,14 @@ def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -310,26 +378,36 @@ def create_namespaced_ingress(self, namespace, body, **kwargs): # 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_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 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 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: 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.create_namespaced_ingress_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -340,28 +418,44 @@ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): 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_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 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 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(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() @@ -379,7 +473,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' ] ) @@ -392,12 +489,10 @@ def create_namespaced_ingress_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_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 + if self.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 = {} @@ -407,16 +502,16 @@ def create_namespaced_ingress_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 = {} @@ -431,6 +526,13 @@ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): # 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}/ingresses', 'POST', path_params, @@ -439,13 +541,14 @@ def create_namespaced_ingress_with_http_info(self, namespace, body, **kwargs): 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 @@ -453,26 +556,36 @@ def create_namespaced_network_policy(self, namespace, body, **kwargs): # noqa: 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.create_namespaced_network_policy(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: 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: V1NetworkPolicy + :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.create_namespaced_network_policy_with_http_info(namespace, body, **kwargs) # noqa: E501 @@ -483,28 +596,44 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa 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.create_namespaced_network_policy_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: 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(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(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -522,7 +651,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' ] ) @@ -535,12 +667,10 @@ def create_namespaced_network_policy_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_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 + if self.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 = {} @@ -550,16 +680,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 = {} @@ -574,6 +704,13 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa # 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/namespaces/{namespace}/networkpolicies', 'POST', path_params, @@ -582,13 +719,14 @@ def create_namespaced_network_policy_with_http_info(self, namespace, body, **kwa 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 create_service_cidr(self, body, **kwargs): # noqa: E501 """create_service_cidr # noqa: E501 @@ -596,25 +734,34 @@ def create_service_cidr(self, body, **kwargs): # 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 V1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1ServiceCIDR + :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.create_service_cidr_with_http_info(body, **kwargs) # noqa: E501 @@ -625,27 +772,42 @@ def create_service_cidr_with_http_info(self, body, **kwargs): # 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 V1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -662,7 +824,10 @@ def create_service_cidr_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' ] ) @@ -675,8 +840,7 @@ def create_service_cidr_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_service_cidr`") # noqa: E501 collection_formats = {} @@ -684,16 +848,16 @@ def create_service_cidr_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 = {} @@ -708,6 +872,13 @@ def create_service_cidr_with_http_info(self, body, **kwargs): # 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/servicecidrs', 'POST', path_params, @@ -716,13 +887,14 @@ def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -730,35 +902,54 @@ def delete_collection_ingress_class(self, **kwargs): # 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_ingress_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_ingress_class_with_http_info(**kwargs) # noqa: E501 @@ -769,37 +960,62 @@ def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E50 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_ingress_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -826,7 +1042,10 @@ def delete_collection_ingress_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' ] ) @@ -844,36 +1063,36 @@ def delete_collection_ingress_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -888,6 +1107,11 @@ def delete_collection_ingress_class_with_http_info(self, **kwargs): # noqa: E50 # 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', 'DELETE', path_params, @@ -896,13 +1120,14 @@ def delete_collection_ingress_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_ip_address(self, **kwargs): # noqa: E501 """delete_collection_ip_address # noqa: E501 @@ -910,35 +1135,54 @@ def delete_collection_ip_address(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_ip_address_with_http_info(**kwargs) # noqa: E501 @@ -949,37 +1193,62 @@ def delete_collection_ip_address_with_http_info(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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,7 +1275,10 @@ def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1024,36 +1296,36 @@ def delete_collection_ip_address_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1068,6 +1340,11 @@ def delete_collection_ip_address_with_http_info(self, **kwargs): # 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/ipaddresses', 'DELETE', path_params, @@ -1076,13 +1353,14 @@ def delete_collection_ip_address_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_ingress(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_ingress # noqa: E501 @@ -1090,36 +1368,56 @@ def delete_collection_namespaced_ingress(self, namespace, **kwargs): # noqa: E5 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_collection_namespaced_ingress(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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_ingress_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1130,38 +1428,64 @@ def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwarg 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_collection_namespaced_ingress_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1189,7 +1513,10 @@ def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1202,8 +1529,7 @@ def delete_collection_namespaced_ingress_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_ingress`") # noqa: E501 collection_formats = {} @@ -1213,36 +1539,36 @@ def delete_collection_namespaced_ingress_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1257,6 +1583,11 @@ def delete_collection_namespaced_ingress_with_http_info(self, namespace, **kwarg # 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', 'DELETE', path_params, @@ -1265,13 +1596,14 @@ def delete_collection_namespaced_ingress_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_network_policy(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_network_policy # noqa: E501 @@ -1279,36 +1611,56 @@ def delete_collection_namespaced_network_policy(self, namespace, **kwargs): # n 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_collection_namespaced_network_policy(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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_network_policy_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1319,38 +1671,64 @@ def delete_collection_namespaced_network_policy_with_http_info(self, namespace, 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_collection_namespaced_network_policy_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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1378,7 +1756,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' ] ) @@ -1391,8 +1772,7 @@ def delete_collection_namespaced_network_policy_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_network_policy`") # noqa: E501 collection_formats = {} @@ -1402,36 +1782,36 @@ def delete_collection_namespaced_network_policy_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1446,6 +1826,11 @@ def delete_collection_namespaced_network_policy_with_http_info(self, namespace, # 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', path_params, @@ -1454,13 +1839,14 @@ def delete_collection_namespaced_network_policy_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_service_cidr(self, **kwargs): # noqa: E501 """delete_collection_service_cidr # noqa: E501 @@ -1468,35 +1854,54 @@ def delete_collection_service_cidr(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_service_cidr_with_http_info(**kwargs) # noqa: E501 @@ -1507,37 +1912,62 @@ def delete_collection_service_cidr_with_http_info(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1564,7 +1994,10 @@ def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1582,36 +2015,36 @@ def delete_collection_service_cidr_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1626,6 +2059,11 @@ def delete_collection_service_cidr_with_http_info(self, **kwargs): # 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/servicecidrs', 'DELETE', path_params, @@ -1634,13 +2072,14 @@ def delete_collection_service_cidr_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_ingress_class(self, name, **kwargs): # noqa: E501 """delete_ingress_class # noqa: E501 @@ -1648,28 +2087,40 @@ def delete_ingress_class(self, name, **kwargs): # 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.delete_ingress_class(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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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 @@ -1680,30 +2131,48 @@ def delete_ingress_class_with_http_info(self, name, **kwargs): # 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.delete_ingress_class_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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(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() @@ -1723,7 +2192,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' ] ) @@ -1736,8 +2208,7 @@ def delete_ingress_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_ingress_class`") # noqa: E501 collection_formats = {} @@ -1747,20 +2218,20 @@ def delete_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1775,6 +2246,12 @@ def delete_ingress_class_with_http_info(self, name, **kwargs): # 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/{name}', 'DELETE', path_params, @@ -1783,13 +2260,14 @@ def delete_ingress_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 delete_ip_address(self, name, **kwargs): # noqa: E501 """delete_ip_address # noqa: E501 @@ -1797,28 +2275,40 @@ def delete_ip_address(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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_ip_address_with_http_info(name, **kwargs) # noqa: E501 @@ -1829,30 +2319,48 @@ def delete_ip_address_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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(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() @@ -1872,7 +2380,10 @@ def delete_ip_address_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' ] ) @@ -1885,8 +2396,7 @@ def delete_ip_address_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_ip_address`") # noqa: E501 collection_formats = {} @@ -1896,20 +2406,20 @@ def delete_ip_address_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1924,6 +2434,12 @@ def delete_ip_address_with_http_info(self, name, **kwargs): # 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/ipaddresses/{name}', 'DELETE', path_params, @@ -1932,13 +2448,14 @@ def delete_ip_address_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_ingress(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_ingress # noqa: E501 @@ -1946,29 +2463,42 @@ def delete_namespaced_ingress(self, name, namespace, **kwargs): # 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.delete_namespaced_ingress(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 str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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 @@ -1979,31 +2509,50 @@ def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): 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.delete_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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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(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() @@ -2024,7 +2573,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' ] ) @@ -2037,12 +2589,10 @@ def delete_namespaced_ingress_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_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 + if self.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 = {} @@ -2054,20 +2604,20 @@ def delete_namespaced_ingress_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2082,6 +2632,12 @@ def delete_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # 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, @@ -2090,13 +2646,14 @@ def delete_namespaced_ingress_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_network_policy(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_network_policy # noqa: E501 @@ -2104,29 +2661,42 @@ def delete_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: 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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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 @@ -2137,31 +2707,50 @@ def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwa 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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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() @@ -2182,7 +2771,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' ] ) @@ -2195,12 +2787,10 @@ def delete_namespaced_network_policy_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_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 + if self.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 = {} @@ -2212,20 +2802,20 @@ def delete_namespaced_network_policy_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2240,6 +2830,12 @@ def delete_namespaced_network_policy_with_http_info(self, name, namespace, **kwa # 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, @@ -2248,13 +2844,14 @@ def delete_namespaced_network_policy_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 delete_service_cidr(self, name, **kwargs): # noqa: E501 """delete_service_cidr # noqa: E501 @@ -2262,28 +2859,40 @@ def delete_service_cidr(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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_service_cidr_with_http_info(name, **kwargs) # noqa: E501 @@ -2294,30 +2903,48 @@ def delete_service_cidr_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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() @@ -2337,7 +2964,10 @@ def delete_service_cidr_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' ] ) @@ -2350,8 +2980,7 @@ def delete_service_cidr_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_service_cidr`") # noqa: E501 collection_formats = {} @@ -2361,20 +2990,20 @@ def delete_service_cidr_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2389,6 +3018,12 @@ def delete_service_cidr_with_http_info(self, name, **kwargs): # 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, @@ -2397,13 +3032,14 @@ def delete_service_cidr_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 @@ -2411,20 +3047,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 @@ -2435,22 +3075,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() @@ -2462,7 +3112,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' ] ) @@ -2481,7 +3134,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 = {} @@ -2494,6 +3147,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2502,13 +3160,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_ingress_class(self, **kwargs): # noqa: E501 """list_ingress_class # noqa: E501 @@ -2516,31 +3175,46 @@ def list_ingress_class(self, **kwargs): # 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 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: V1IngressClassList + :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 @@ -2551,33 +3225,54 @@ def list_ingress_class_with_http_info(self, **kwargs): # 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 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(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(V1IngressClassList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2600,7 +3295,10 @@ def list_ingress_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' ] ) @@ -2618,30 +3316,30 @@ def list_ingress_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 = {} @@ -2654,6 +3352,11 @@ def list_ingress_class_with_http_info(self, **kwargs): # 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, @@ -2662,13 +3365,14 @@ def list_ingress_class_with_http_info(self, **kwargs): # noqa: E501 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 @@ -2676,31 +3380,46 @@ def list_ingress_for_all_namespaces(self, **kwargs): # 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 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: V1IngressList + :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 @@ -2711,33 +3430,54 @@ def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 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 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(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(V1IngressList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -2760,7 +3500,10 @@ def list_ingress_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' ] ) @@ -2778,30 +3521,30 @@ def list_ingress_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 = {} @@ -2814,6 +3557,11 @@ def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 # 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, @@ -2822,13 +3570,14 @@ def list_ingress_for_all_namespaces_with_http_info(self, **kwargs): # noqa: E50 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_ip_address(self, **kwargs): # noqa: E501 """list_ip_address # noqa: E501 @@ -2836,31 +3585,46 @@ def list_ip_address(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1IPAddressList + :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 @@ -2871,33 +3635,54 @@ def list_ip_address_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1IPAddressList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2920,7 +3705,10 @@ def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2938,30 +3726,30 @@ def list_ip_address_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 = {} @@ -2974,6 +3762,11 @@ def list_ip_address_with_http_info(self, **kwargs): # 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, @@ -2982,13 +3775,14 @@ def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IPAddressList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -2996,32 +3790,48 @@ def list_namespaced_ingress(self, namespace, **kwargs): # 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 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: V1IngressList + :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 @@ -3032,34 +3842,56 @@ def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: 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 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(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(V1IngressList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3083,7 +3915,10 @@ def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3096,8 +3931,7 @@ def list_namespaced_ingress_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_ingress`") # noqa: E501 collection_formats = {} @@ -3107,30 +3941,30 @@ def list_namespaced_ingress_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 = {} @@ -3143,6 +3977,11 @@ def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: # 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, @@ -3151,13 +3990,14 @@ def list_namespaced_ingress_with_http_info(self, namespace, **kwargs): # noqa: 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 @@ -3165,32 +4005,48 @@ def list_namespaced_network_policy(self, namespace, **kwargs): # 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 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: V1NetworkPolicyList + :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 @@ -3201,34 +4057,56 @@ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # 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 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(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(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3252,7 +4130,10 @@ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3265,8 +4146,7 @@ def list_namespaced_network_policy_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_network_policy`") # noqa: E501 collection_formats = {} @@ -3276,30 +4156,30 @@ def list_namespaced_network_policy_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 = {} @@ -3312,6 +4192,11 @@ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # # 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, @@ -3320,13 +4205,14 @@ def list_namespaced_network_policy_with_http_info(self, namespace, **kwargs): # 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 @@ -3334,31 +4220,46 @@ def list_network_policy_for_all_namespaces(self, **kwargs): # 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 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: V1NetworkPolicyList + :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 @@ -3369,33 +4270,54 @@ def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # no 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 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(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(V1NetworkPolicyList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -3418,7 +4340,10 @@ def list_network_policy_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' ] ) @@ -3436,30 +4361,30 @@ def list_network_policy_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 = {} @@ -3472,6 +4397,11 @@ def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # no # 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, @@ -3480,13 +4410,14 @@ def list_network_policy_for_all_namespaces_with_http_info(self, **kwargs): # no 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_service_cidr(self, **kwargs): # noqa: E501 """list_service_cidr # noqa: E501 @@ -3494,31 +4425,46 @@ def list_service_cidr(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1ServiceCIDRList + :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 @@ -3529,33 +4475,54 @@ def list_service_cidr_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3578,7 +4545,10 @@ def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3596,30 +4566,30 @@ def list_service_cidr_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 = {} @@ -3632,6 +4602,11 @@ def list_service_cidr_with_http_info(self, **kwargs): # 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, @@ -3640,13 +4615,14 @@ def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDRList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -3654,27 +4630,38 @@ def patch_ingress_class(self, name, body, **kwargs): # 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 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 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: 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.patch_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -3685,29 +4672,46 @@ def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E50 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 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 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. - :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() @@ -3726,7 +4730,10 @@ def patch_ingress_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' ] ) @@ -3739,12 +4746,10 @@ def patch_ingress_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_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 + if self.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 = {} @@ -3754,18 +4759,18 @@ def patch_ingress_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 = {} @@ -3778,12 +4783,22 @@ def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E50 ['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', 'application/apply-patch+cbor']) # 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: "V1IngressClass", + 201: "V1IngressClass", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/ingressclasses/{name}', 'PATCH', path_params, @@ -3792,13 +4807,14 @@ def patch_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E50 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_ip_address(self, name, body, **kwargs): # noqa: E501 """patch_ip_address # noqa: E501 @@ -3806,27 +4822,38 @@ def patch_ip_address(self, name, body, **kwargs): # 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 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: V1IPAddress + :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 @@ -3837,29 +4864,46 @@ def patch_ip_address_with_http_info(self, name, body, **kwargs): # 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 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. - :return: tuple(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3878,7 +4922,10 @@ def patch_ip_address_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' ] ) @@ -3891,12 +4938,10 @@ def patch_ip_address_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_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 + if self.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 = {} @@ -3906,18 +4951,18 @@ def patch_ip_address_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 = {} @@ -3930,12 +4975,22 @@ def patch_ip_address_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1IPAddress", + 201: "V1IPAddress", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/ipaddresses/{name}', 'PATCH', path_params, @@ -3944,13 +4999,14 @@ def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -3958,28 +5014,40 @@ def patch_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: E5 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 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 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: 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 @@ -3990,30 +5058,48 @@ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwarg 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 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 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(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() @@ -4033,7 +5119,10 @@ def patch_namespaced_ingress_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' ] ) @@ -4046,16 +5135,13 @@ def patch_namespaced_ingress_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_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 + if self.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 ('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_ingress`") # noqa: E501 collection_formats = {} @@ -4067,18 +5153,18 @@ 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 + if 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 = {} @@ -4091,12 +5177,22 @@ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwarg ['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', 'application/apply-patch+cbor']) # 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: "V1Ingress", + 201: "V1Ingress", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}', 'PATCH', path_params, @@ -4105,13 +5201,14 @@ def patch_namespaced_ingress_with_http_info(self, name, namespace, body, **kwarg 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 @@ -4119,28 +5216,40 @@ def patch_namespaced_ingress_status(self, name, namespace, body, **kwargs): # n 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 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 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: 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_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -4151,30 +5260,48 @@ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, 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 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 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(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() @@ -4194,7 +5321,10 @@ def patch_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' ] ) @@ -4207,16 +5337,13 @@ def patch_namespaced_ingress_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_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 + if self.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 ('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_ingress_status`") # noqa: E501 collection_formats = {} @@ -4228,18 +5355,18 @@ 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 + if 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 = {} @@ -4252,12 +5379,22 @@ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "V1Ingress", + 201: "V1Ingress", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status', 'PATCH', path_params, @@ -4266,13 +5403,14 @@ def patch_namespaced_ingress_status_with_http_info(self, name, namespace, body, 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 @@ -4280,28 +5418,40 @@ def patch_namespaced_network_policy(self, name, namespace, body, **kwargs): # n 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 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 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: V1NetworkPolicy + :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 @@ -4312,30 +5462,48 @@ def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, 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 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 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. - :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(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -4355,7 +5523,10 @@ def patch_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' ] ) @@ -4368,16 +5539,13 @@ def patch_namespaced_network_policy_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_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 + if self.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 ('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_network_policy`") # noqa: E501 collection_formats = {} @@ -4389,18 +5557,18 @@ def patch_namespaced_network_policy_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 = {} @@ -4413,12 +5581,22 @@ def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "V1NetworkPolicy", + 201: "V1NetworkPolicy", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}', 'PATCH', path_params, @@ -4427,13 +5605,14 @@ def patch_namespaced_network_policy_with_http_info(self, name, namespace, body, 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 patch_service_cidr(self, name, body, **kwargs): # noqa: E501 """patch_service_cidr # noqa: E501 @@ -4441,27 +5620,38 @@ def patch_service_cidr(self, name, body, **kwargs): # 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 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: V1ServiceCIDR + :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_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4472,29 +5662,46 @@ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # 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 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. - :return: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4513,7 +5720,10 @@ def patch_service_cidr_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' ] ) @@ -4526,12 +5736,10 @@ def patch_service_cidr_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_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 + if self.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 = {} @@ -4541,18 +5749,18 @@ def patch_service_cidr_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 = {} @@ -4565,12 +5773,22 @@ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/servicecidrs/{name}', 'PATCH', path_params, @@ -4579,13 +5797,14 @@ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr_status(self, name, body, **kwargs): # noqa: E501 """patch_service_cidr_status # noqa: E501 @@ -4593,27 +5812,38 @@ def patch_service_cidr_status(self, name, body, **kwargs): # 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 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: V1ServiceCIDR + :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 @@ -4624,29 +5854,46 @@ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noq 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 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. - :return: tuple(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4665,7 +5912,10 @@ def patch_service_cidr_status_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' ] ) @@ -4678,12 +5928,10 @@ def patch_service_cidr_status_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 `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 + if self.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 = {} @@ -4693,18 +5941,18 @@ def patch_service_cidr_status_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 - 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 = {} @@ -4717,12 +5965,22 @@ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noq ['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', 'application/apply-patch+cbor']) # 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: "V1ServiceCIDR", + 201: "V1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1/servicecidrs/{name}/status', 'PATCH', path_params, @@ -4731,13 +5989,14 @@ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -4745,22 +6004,28 @@ def read_ingress_class(self, name, **kwargs): # 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 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 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: 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.read_ingress_class_with_http_info(name, **kwargs) # noqa: E501 @@ -4771,24 +6036,36 @@ def read_ingress_class_with_http_info(self, name, **kwargs): # 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_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 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(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() @@ -4802,7 +6079,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' ] ) @@ -4815,8 +6095,7 @@ def read_ingress_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_ingress_class`") # noqa: E501 collection_formats = {} @@ -4826,10 +6105,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 = {} @@ -4842,6 +6121,11 @@ def read_ingress_class_with_http_info(self, name, **kwargs): # 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/ingressclasses/{name}', 'GET', path_params, @@ -4850,13 +6134,14 @@ def read_ingress_class_with_http_info(self, name, **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 read_ip_address(self, name, **kwargs): # noqa: E501 """read_ip_address # noqa: E501 @@ -4864,22 +6149,28 @@ def read_ip_address(self, name, **kwargs): # 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 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: V1IPAddress + :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_ip_address_with_http_info(name, **kwargs) # noqa: E501 @@ -4890,24 +6181,36 @@ def read_ip_address_with_http_info(self, name, **kwargs): # 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 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(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4921,7 +6224,10 @@ def read_ip_address_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' ] ) @@ -4934,8 +6240,7 @@ def read_ip_address_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_ip_address`") # noqa: E501 collection_formats = {} @@ -4945,10 +6250,10 @@ def read_ip_address_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 = {} @@ -4961,6 +6266,11 @@ def read_ip_address_with_http_info(self, name, **kwargs): # 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/ipaddresses/{name}', 'GET', path_params, @@ -4969,13 +6279,14 @@ def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -4983,23 +6294,30 @@ def read_namespaced_ingress(self, name, namespace, **kwargs): # 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.read_namespaced_ingress(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 str pretty: If 'true', then 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-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.read_namespaced_ingress_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -5010,25 +6328,38 @@ def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # 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.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 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 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() @@ -5043,7 +6374,10 @@ def read_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' ] ) @@ -5056,12 +6390,10 @@ def read_namespaced_ingress_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_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 + if self.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 = {} @@ -5073,10 +6405,10 @@ def read_namespaced_ingress_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 = {} @@ -5089,6 +6421,11 @@ def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # # 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}', 'GET', path_params, @@ -5097,13 +6434,14 @@ def read_namespaced_ingress_with_http_info(self, name, namespace, **kwargs): # 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 @@ -5111,23 +6449,30 @@ def read_namespaced_ingress_status(self, name, namespace, **kwargs): # noqa: E5 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.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 str pretty: If 'true', then 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-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.read_namespaced_ingress_status_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -5138,25 +6483,38 @@ def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwarg 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.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 str pretty: If 'true', then 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 pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-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() @@ -5171,7 +6529,10 @@ def read_namespaced_ingress_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' ] ) @@ -5184,12 +6545,10 @@ def read_namespaced_ingress_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_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 + if self.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 = {} @@ -5201,10 +6560,10 @@ def read_namespaced_ingress_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 = {} @@ -5217,6 +6576,11 @@ def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwarg # 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}/status', 'GET', path_params, @@ -5225,13 +6589,14 @@ def read_namespaced_ingress_status_with_http_info(self, name, namespace, **kwarg 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 @@ -5239,23 +6604,30 @@ def read_namespaced_network_policy(self, name, namespace, **kwargs): # noqa: E5 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.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 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 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: V1NetworkPolicy + :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.read_namespaced_network_policy_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -5266,25 +6638,38 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg 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.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 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 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(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(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -5299,7 +6684,10 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5312,12 +6700,10 @@ def read_namespaced_network_policy_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_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 + if self.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 = {} @@ -5329,10 +6715,10 @@ 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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -5345,6 +6731,11 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg # 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}/networkpolicies/{name}', 'GET', path_params, @@ -5353,13 +6744,14 @@ def read_namespaced_network_policy_with_http_info(self, name, namespace, **kwarg 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_service_cidr(self, name, **kwargs): # noqa: E501 """read_service_cidr # noqa: E501 @@ -5367,22 +6759,28 @@ def read_service_cidr(self, name, **kwargs): # 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 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: V1ServiceCIDR + :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_service_cidr_with_http_info(name, **kwargs) # noqa: E501 @@ -5393,24 +6791,36 @@ def read_service_cidr_with_http_info(self, name, **kwargs): # 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 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(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5424,7 +6834,10 @@ def read_service_cidr_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' ] ) @@ -5437,8 +6850,7 @@ def read_service_cidr_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_service_cidr`") # noqa: E501 collection_formats = {} @@ -5448,10 +6860,10 @@ def read_service_cidr_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 = {} @@ -5464,6 +6876,11 @@ def read_service_cidr_with_http_info(self, name, **kwargs): # 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/servicecidrs/{name}', 'GET', path_params, @@ -5472,13 +6889,14 @@ def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr_status(self, name, **kwargs): # noqa: E501 """read_service_cidr_status # noqa: E501 @@ -5486,22 +6904,28 @@ def read_service_cidr_status(self, name, **kwargs): # 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 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: V1ServiceCIDR + :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_service_cidr_status_with_http_info(name, **kwargs) # noqa: E501 @@ -5512,24 +6936,36 @@ def read_service_cidr_status_with_http_info(self, name, **kwargs): # 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 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(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5543,7 +6979,10 @@ def read_service_cidr_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' ] ) @@ -5556,8 +6995,7 @@ def read_service_cidr_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_service_cidr_status`") # noqa: E501 collection_formats = {} @@ -5567,10 +7005,10 @@ def read_service_cidr_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 = {} @@ -5583,6 +7021,11 @@ def read_service_cidr_status_with_http_info(self, name, **kwargs): # 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/servicecidrs/{name}/status', 'GET', path_params, @@ -5591,13 +7034,14 @@ def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -5605,26 +7049,36 @@ def replace_ingress_class(self, name, body, **kwargs): # 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.replace_ingress_class(name, 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 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: 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.replace_ingress_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5635,28 +7089,44 @@ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E 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.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 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 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(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() @@ -5674,7 +7144,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' ] ) @@ -5687,12 +7160,10 @@ def replace_ingress_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_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 + if self.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 = {} @@ -5702,16 +7173,16 @@ def replace_ingress_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 = {} @@ -5726,6 +7197,12 @@ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E # 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}', 'PUT', path_params, @@ -5734,13 +7211,14 @@ def replace_ingress_class_with_http_info(self, name, body, **kwargs): # noqa: E 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_ip_address(self, name, body, **kwargs): # noqa: E501 """replace_ip_address # noqa: E501 @@ -5748,26 +7226,36 @@ def replace_ip_address(self, name, body, **kwargs): # 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 V1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1IPAddress + :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.replace_ip_address_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5778,28 +7266,44 @@ def replace_ip_address_with_http_info(self, name, body, **kwargs): # 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 V1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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(V1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5817,7 +7321,10 @@ def replace_ip_address_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' ] ) @@ -5830,12 +7337,10 @@ def replace_ip_address_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_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 + if self.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 = {} @@ -5845,16 +7350,16 @@ def replace_ip_address_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 = {} @@ -5869,6 +7374,12 @@ def replace_ip_address_with_http_info(self, name, body, **kwargs): # 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/ipaddresses/{name}', 'PUT', path_params, @@ -5877,13 +7388,14 @@ def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -5891,27 +7403,38 @@ def replace_namespaced_ingress(self, name, namespace, body, **kwargs): # noqa: 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.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 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 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: 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.replace_namespaced_ingress_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -5922,29 +7445,46 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa 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.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 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 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(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() @@ -5963,7 +7503,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' ] ) @@ -5976,16 +7519,13 @@ def replace_namespaced_ingress_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_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 + if self.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 ('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_ingress`") # noqa: E501 collection_formats = {} @@ -5997,16 +7537,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 = {} @@ -6021,6 +7561,12 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa # 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}', 'PUT', path_params, @@ -6029,13 +7575,14 @@ def replace_namespaced_ingress_with_http_info(self, name, namespace, body, **kwa 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 @@ -6043,27 +7590,38 @@ def replace_namespaced_ingress_status(self, name, namespace, body, **kwargs): # 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_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 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 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: 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.replace_namespaced_ingress_status_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -6074,29 +7632,46 @@ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body 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_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 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 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(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() @@ -6115,7 +7690,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' ] ) @@ -6128,16 +7706,13 @@ def replace_namespaced_ingress_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_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 + if self.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 + if self.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 = {} @@ -6149,16 +7724,16 @@ def replace_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 + if 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 = {} @@ -6173,6 +7748,12 @@ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body # 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', 'PUT', path_params, @@ -6181,13 +7762,14 @@ def replace_namespaced_ingress_status_with_http_info(self, name, namespace, body 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 @@ -6195,27 +7777,38 @@ def replace_namespaced_network_policy(self, name, namespace, body, **kwargs): # 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_network_policy(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 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 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: V1NetworkPolicy + :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_network_policy_with_http_info(name, namespace, body, **kwargs) # noqa: E501 @@ -6226,29 +7819,46 @@ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body 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_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 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 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(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(V1NetworkPolicy, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() @@ -6267,7 +7877,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' ] ) @@ -6280,16 +7893,13 @@ def replace_namespaced_network_policy_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_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 + if self.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 + if self.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 = {} @@ -6301,16 +7911,16 @@ def replace_namespaced_network_policy_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 = {} @@ -6325,6 +7935,12 @@ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body # 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}/networkpolicies/{name}', 'PUT', path_params, @@ -6333,13 +7949,14 @@ def replace_namespaced_network_policy_with_http_info(self, name, namespace, body 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_service_cidr(self, name, body, **kwargs): # noqa: E501 """replace_service_cidr # noqa: E501 @@ -6347,26 +7964,36 @@ def replace_service_cidr(self, name, body, **kwargs): # 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 V1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1ServiceCIDR + :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_service_cidr_with_http_info(name, body, **kwargs) # noqa: E501 @@ -6377,28 +8004,44 @@ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E5 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 V1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -6416,7 +8059,10 @@ def replace_service_cidr_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' ] ) @@ -6429,12 +8075,10 @@ def replace_service_cidr_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_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 + if self.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 = {} @@ -6444,16 +8088,16 @@ def replace_service_cidr_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 = {} @@ -6468,6 +8112,12 @@ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E5 # 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}', 'PUT', path_params, @@ -6476,13 +8126,14 @@ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr_status(self, name, body, **kwargs): # noqa: E501 """replace_service_cidr_status # noqa: E501 @@ -6490,26 +8141,36 @@ def replace_service_cidr_status(self, name, body, **kwargs): # 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 V1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: V1ServiceCIDR + :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_service_cidr_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -6520,28 +8181,44 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n 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 V1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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(V1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -6559,7 +8236,10 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6572,12 +8252,10 @@ def replace_service_cidr_status_with_http_info(self, name, body, **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 `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 + if self.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 = {} @@ -6587,16 +8265,16 @@ def replace_service_cidr_status_with_http_info(self, name, body, **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 '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 = {} @@ -6611,6 +8289,12 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n # 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', 'PUT', path_params, @@ -6619,10 +8303,11 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_v1beta1_api.py b/kubernetes/client/api/networking_v1beta1_api.py index 46d2250600..b7b7b63f1d 100644 --- a/kubernetes/client/api/networking_v1beta1_api.py +++ b/kubernetes/client/api/networking_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_ip_address(self, body, **kwargs): # 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 V1beta1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1IPAddress + :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 @@ -71,27 +80,42 @@ def create_ip_address_with_http_info(self, body, **kwargs): # 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 V1beta1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -108,7 +132,10 @@ def create_ip_address_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_ip_address_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_ip_address`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_ip_address_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 = {} @@ -154,6 +180,13 @@ def create_ip_address_with_http_info(self, body, **kwargs): # 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, @@ -162,13 +195,14 @@ def create_ip_address_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr(self, body, **kwargs): # noqa: E501 """create_service_cidr # noqa: E501 @@ -176,25 +210,34 @@ def create_service_cidr(self, body, **kwargs): # 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 V1beta1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ServiceCIDR + :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 @@ -205,27 +248,42 @@ def create_service_cidr_with_http_info(self, body, **kwargs): # 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 V1beta1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -242,7 +300,10 @@ def create_service_cidr_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_service_cidr_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_service_cidr`") # noqa: E501 collection_formats = {} @@ -264,16 +324,16 @@ def create_service_cidr_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 = {} @@ -288,6 +348,13 @@ def create_service_cidr_with_http_info(self, body, **kwargs): # 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, @@ -296,13 +363,14 @@ def create_service_cidr_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_ip_address(self, **kwargs): # noqa: E501 """delete_collection_ip_address # noqa: E501 @@ -310,35 +378,54 @@ def delete_collection_ip_address(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_ip_address_with_http_info(**kwargs) # noqa: E501 @@ -349,37 +436,62 @@ def delete_collection_ip_address_with_http_info(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -406,7 +518,10 @@ def delete_collection_ip_address_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -424,36 +539,36 @@ def delete_collection_ip_address_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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,6 +583,11 @@ def delete_collection_ip_address_with_http_info(self, **kwargs): # 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, @@ -476,13 +596,14 @@ def delete_collection_ip_address_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_service_cidr(self, **kwargs): # noqa: E501 """delete_collection_service_cidr # noqa: E501 @@ -490,35 +611,54 @@ def delete_collection_service_cidr(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_service_cidr_with_http_info(**kwargs) # noqa: E501 @@ -529,37 +669,62 @@ def delete_collection_service_cidr_with_http_info(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -586,7 +751,10 @@ def delete_collection_service_cidr_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -604,36 +772,36 @@ def delete_collection_service_cidr_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -648,6 +816,11 @@ def delete_collection_service_cidr_with_http_info(self, **kwargs): # 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, @@ -656,13 +829,14 @@ def delete_collection_service_cidr_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_ip_address(self, name, **kwargs): # noqa: E501 """delete_ip_address # noqa: E501 @@ -670,28 +844,40 @@ def delete_ip_address(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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_ip_address_with_http_info(name, **kwargs) # noqa: E501 @@ -702,30 +888,48 @@ def delete_ip_address_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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(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() @@ -745,7 +949,10 @@ def delete_ip_address_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' ] ) @@ -758,8 +965,7 @@ def delete_ip_address_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_ip_address`") # noqa: E501 collection_formats = {} @@ -769,20 +975,20 @@ def delete_ip_address_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -797,6 +1003,12 @@ def delete_ip_address_with_http_info(self, name, **kwargs): # 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, @@ -805,13 +1017,14 @@ def delete_ip_address_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_service_cidr(self, name, **kwargs): # noqa: E501 """delete_service_cidr # noqa: E501 @@ -819,28 +1032,40 @@ def delete_service_cidr(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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_service_cidr_with_http_info(name, **kwargs) # noqa: E501 @@ -851,30 +1076,48 @@ def delete_service_cidr_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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() @@ -894,7 +1137,10 @@ def delete_service_cidr_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' ] ) @@ -907,8 +1153,7 @@ def delete_service_cidr_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_service_cidr`") # noqa: E501 collection_formats = {} @@ -918,20 +1163,20 @@ def delete_service_cidr_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -946,6 +1191,12 @@ def delete_service_cidr_with_http_info(self, name, **kwargs): # 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, @@ -954,13 +1205,14 @@ def delete_service_cidr_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 @@ -968,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 @@ -992,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() @@ -1019,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' ] ) @@ -1038,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 = {} @@ -1051,6 +1320,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -1059,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_ip_address(self, **kwargs): # noqa: E501 """list_ip_address # noqa: E501 @@ -1073,31 +1348,46 @@ def list_ip_address(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1beta1IPAddressList + :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 @@ -1108,33 +1398,54 @@ def list_ip_address_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1beta1IPAddressList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1157,7 +1468,10 @@ def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1175,30 +1489,30 @@ def list_ip_address_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 = {} @@ -1211,6 +1525,11 @@ def list_ip_address_with_http_info(self, **kwargs): # 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, @@ -1219,13 +1538,14 @@ def list_ip_address_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1IPAddressList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_cidr(self, **kwargs): # noqa: E501 """list_service_cidr # noqa: E501 @@ -1233,31 +1553,46 @@ def list_service_cidr(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1beta1ServiceCIDRList + :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 @@ -1268,33 +1603,54 @@ def list_service_cidr_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1beta1ServiceCIDRList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1317,7 +1673,10 @@ def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1335,30 +1694,30 @@ def list_service_cidr_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 = {} @@ -1371,6 +1730,11 @@ def list_service_cidr_with_http_info(self, **kwargs): # 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, @@ -1379,13 +1743,14 @@ def list_service_cidr_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDRList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_ip_address(self, name, body, **kwargs): # noqa: E501 """patch_ip_address # noqa: E501 @@ -1393,27 +1758,38 @@ def patch_ip_address(self, name, body, **kwargs): # 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 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: V1beta1IPAddress + :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 @@ -1424,29 +1800,46 @@ def patch_ip_address_with_http_info(self, name, body, **kwargs): # 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 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. - :return: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1465,7 +1858,10 @@ def patch_ip_address_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' ] ) @@ -1478,12 +1874,10 @@ def patch_ip_address_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_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 + if self.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 = {} @@ -1493,18 +1887,18 @@ def patch_ip_address_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 = {} @@ -1517,12 +1911,22 @@ def patch_ip_address_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1beta1IPAddress", + 201: "V1beta1IPAddress", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1beta1/ipaddresses/{name}', 'PATCH', path_params, @@ -1531,13 +1935,14 @@ def patch_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr(self, name, body, **kwargs): # noqa: E501 """patch_service_cidr # noqa: E501 @@ -1545,27 +1950,38 @@ def patch_service_cidr(self, name, body, **kwargs): # 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 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: V1beta1ServiceCIDR + :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 @@ -1576,29 +1992,46 @@ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # 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 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. - :return: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1617,7 +2050,10 @@ def patch_service_cidr_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' ] ) @@ -1630,12 +2066,10 @@ def patch_service_cidr_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_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 + if self.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 = {} @@ -1645,18 +2079,18 @@ def patch_service_cidr_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 = {} @@ -1669,12 +2103,22 @@ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}', 'PATCH', path_params, @@ -1683,13 +2127,14 @@ def patch_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr_status(self, name, body, **kwargs): # noqa: E501 """patch_service_cidr_status # noqa: E501 @@ -1697,27 +2142,38 @@ def patch_service_cidr_status(self, name, body, **kwargs): # 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 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: V1beta1ServiceCIDR + :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 @@ -1728,29 +2184,46 @@ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noq 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 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. - :return: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1769,7 +2242,10 @@ def patch_service_cidr_status_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' ] ) @@ -1782,12 +2258,10 @@ def patch_service_cidr_status_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 `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 + if self.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 = {} @@ -1797,18 +2271,18 @@ def patch_service_cidr_status_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 - 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 = {} @@ -1821,12 +2295,22 @@ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noq ['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', 'application/apply-patch+cbor']) # 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: "V1beta1ServiceCIDR", + 201: "V1beta1ServiceCIDR", + 401: None, + } + return self.api_client.call_api( '/apis/networking.k8s.io/v1beta1/servicecidrs/{name}/status', 'PATCH', path_params, @@ -1835,13 +2319,14 @@ def patch_service_cidr_status_with_http_info(self, name, body, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_ip_address(self, name, **kwargs): # noqa: E501 """read_ip_address # noqa: E501 @@ -1849,22 +2334,28 @@ def read_ip_address(self, name, **kwargs): # 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 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: V1beta1IPAddress + :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 @@ -1875,24 +2366,36 @@ def read_ip_address_with_http_info(self, name, **kwargs): # 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 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(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1906,7 +2409,10 @@ def read_ip_address_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' ] ) @@ -1919,8 +2425,7 @@ def read_ip_address_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_ip_address`") # noqa: E501 collection_formats = {} @@ -1930,10 +2435,10 @@ def read_ip_address_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 = {} @@ -1946,6 +2451,11 @@ def read_ip_address_with_http_info(self, name, **kwargs): # 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, @@ -1954,13 +2464,14 @@ def read_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr(self, name, **kwargs): # noqa: E501 """read_service_cidr # noqa: E501 @@ -1968,22 +2479,28 @@ def read_service_cidr(self, name, **kwargs): # 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 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: V1beta1ServiceCIDR + :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 @@ -1994,24 +2511,36 @@ def read_service_cidr_with_http_info(self, name, **kwargs): # 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 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(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2025,7 +2554,10 @@ def read_service_cidr_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' ] ) @@ -2038,8 +2570,7 @@ def read_service_cidr_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_service_cidr`") # noqa: E501 collection_formats = {} @@ -2049,10 +2580,10 @@ def read_service_cidr_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 = {} @@ -2065,6 +2596,11 @@ def read_service_cidr_with_http_info(self, name, **kwargs): # 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, @@ -2073,13 +2609,14 @@ def read_service_cidr_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr_status(self, name, **kwargs): # noqa: E501 """read_service_cidr_status # noqa: E501 @@ -2087,22 +2624,28 @@ def read_service_cidr_status(self, name, **kwargs): # 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 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: V1beta1ServiceCIDR + :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 @@ -2113,24 +2656,36 @@ def read_service_cidr_status_with_http_info(self, name, **kwargs): # 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 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(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2144,7 +2699,10 @@ def read_service_cidr_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' ] ) @@ -2157,8 +2715,7 @@ def read_service_cidr_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_service_cidr_status`") # noqa: E501 collection_formats = {} @@ -2168,10 +2725,10 @@ def read_service_cidr_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 = {} @@ -2184,6 +2741,11 @@ def read_service_cidr_status_with_http_info(self, name, **kwargs): # 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, @@ -2192,13 +2754,14 @@ def read_service_cidr_status_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_ip_address(self, name, body, **kwargs): # noqa: E501 """replace_ip_address # noqa: E501 @@ -2206,26 +2769,36 @@ def replace_ip_address(self, name, body, **kwargs): # 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 V1beta1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1IPAddress + :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 @@ -2236,28 +2809,44 @@ def replace_ip_address_with_http_info(self, name, body, **kwargs): # 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 V1beta1IPAddress body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1IPAddress, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2275,7 +2864,10 @@ def replace_ip_address_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' ] ) @@ -2288,12 +2880,10 @@ def replace_ip_address_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_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 + if self.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 = {} @@ -2303,16 +2893,16 @@ def replace_ip_address_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 = {} @@ -2327,6 +2917,12 @@ def replace_ip_address_with_http_info(self, name, body, **kwargs): # 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, @@ -2335,13 +2931,14 @@ def replace_ip_address_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1IPAddress', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr(self, name, body, **kwargs): # noqa: E501 """replace_service_cidr # noqa: E501 @@ -2349,26 +2946,36 @@ def replace_service_cidr(self, name, body, **kwargs): # 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 V1beta1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ServiceCIDR + :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 @@ -2379,28 +2986,44 @@ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E5 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 V1beta1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2418,7 +3041,10 @@ def replace_service_cidr_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' ] ) @@ -2431,12 +3057,10 @@ def replace_service_cidr_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_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 + if self.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 = {} @@ -2446,16 +3070,16 @@ def replace_service_cidr_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 = {} @@ -2470,6 +3094,12 @@ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E5 # 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, @@ -2478,13 +3108,14 @@ def replace_service_cidr_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_service_cidr_status(self, name, body, **kwargs): # noqa: E501 """replace_service_cidr_status # noqa: E501 @@ -2492,26 +3123,36 @@ def replace_service_cidr_status(self, name, body, **kwargs): # 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 V1beta1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ServiceCIDR + :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 @@ -2522,28 +3163,44 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n 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 V1beta1ServiceCIDR body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1ServiceCIDR, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2561,7 +3218,10 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2574,12 +3234,10 @@ def replace_service_cidr_status_with_http_info(self, name, body, **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 `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 + if self.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 = {} @@ -2589,16 +3247,16 @@ def replace_service_cidr_status_with_http_info(self, name, body, **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 '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 = {} @@ -2613,6 +3271,12 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n # 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, @@ -2621,10 +3285,11 @@ def replace_service_cidr_status_with_http_info(self, name, body, **kwargs): # n body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ServiceCIDR', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_api.py b/kubernetes/client/api/node_api.py index 6cbe732191..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.34 + 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 85220fcdef..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_runtime_class_with_http_info(self, body, **kwargs): # 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,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -215,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -272,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' ] ) @@ -290,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -334,6 +415,11 @@ def delete_collection_runtime_class_with_http_info(self, **kwargs): # noqa: E50 # 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, @@ -342,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 @@ -356,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -388,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -431,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' ] ) @@ -444,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 = {} @@ -455,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -483,6 +602,12 @@ def delete_runtime_class_with_http_info(self, name, **kwargs): # 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, @@ -491,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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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 @@ -610,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 @@ -645,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() @@ -694,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' ] ) @@ -712,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 = {} @@ -748,6 +936,11 @@ def list_runtime_class_with_http_info(self, **kwargs): # 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, @@ -756,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 @@ -770,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 @@ -801,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() @@ -842,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' ] ) @@ -855,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 = {} @@ -870,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 = {} @@ -894,12 +1117,22 @@ def patch_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E50 ['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', 'application/apply-patch+cbor']) # 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, @@ -908,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 @@ -922,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 @@ -948,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() @@ -979,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' ] ) @@ -992,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 = {} @@ -1003,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 = {} @@ -1019,6 +1273,11 @@ def read_runtime_class_with_http_info(self, name, **kwargs): # 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, @@ -1027,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 @@ -1041,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 @@ -1071,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() @@ -1110,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' ] ) @@ -1123,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 = {} @@ -1138,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 = {} @@ -1162,6 +1449,12 @@ def replace_runtime_class_with_http_info(self, name, body, **kwargs): # noqa: E # 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, @@ -1170,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 8d17172a35..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.34 + 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 95ac1ec521..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.34 + 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 d8f7fffdc9..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.34 + 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 = {} @@ -163,6 +190,13 @@ def create_namespaced_pod_disruption_budget_with_http_info(self, namespace, body # 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,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -225,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -284,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' ] ) @@ -297,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 = {} @@ -308,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -352,6 +435,11 @@ def delete_collection_namespaced_pod_disruption_budget_with_http_info(self, name # 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, @@ -360,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 @@ -374,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -407,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -452,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' ] ) @@ -465,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 = {} @@ -482,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -510,6 +632,12 @@ def delete_namespaced_pod_disruption_budget_with_http_info(self, name, namespace # 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, @@ -518,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 @@ -532,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 @@ -556,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() @@ -583,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' ] ) @@ -602,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 = {} @@ -615,6 +761,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -623,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 @@ -637,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 @@ -673,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() @@ -724,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' ] ) @@ -737,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 = {} @@ -748,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 = {} @@ -784,6 +976,11 @@ def list_namespaced_pod_disruption_budget_with_http_info(self, namespace, **kwar # 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, @@ -792,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 @@ -806,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 @@ -841,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() @@ -890,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' ] ) @@ -908,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 = {} @@ -944,6 +1181,11 @@ def list_pod_disruption_budget_for_all_namespaces_with_http_info(self, **kwargs) # 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, @@ -952,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 @@ -966,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 @@ -998,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() @@ -1041,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' ] ) @@ -1054,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 = {} @@ -1075,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 = {} @@ -1099,12 +1372,22 @@ def patch_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, ['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', 'application/apply-patch+cbor']) # 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, @@ -1113,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 @@ -1127,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 @@ -1159,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() @@ -1202,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' ] ) @@ -1215,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 = {} @@ -1236,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 = {} @@ -1260,12 +1574,22 @@ def patch_namespaced_pod_disruption_budget_status_with_http_info(self, name, nam ['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', 'application/apply-patch+cbor']) # 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, @@ -1274,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 @@ -1288,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 @@ -1315,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() @@ -1348,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' ] ) @@ -1361,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 = {} @@ -1378,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 = {} @@ -1394,6 +1740,11 @@ def read_namespaced_pod_disruption_budget_with_http_info(self, name, namespace, # 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, @@ -1402,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 @@ -1416,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 @@ -1443,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() @@ -1476,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' ] ) @@ -1489,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 = {} @@ -1506,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 = {} @@ -1522,6 +1895,11 @@ def read_namespaced_pod_disruption_budget_status_with_http_info(self, name, name # 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, @@ -1530,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 @@ -1544,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 @@ -1575,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() @@ -1616,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' ] ) @@ -1629,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 = {} @@ -1650,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 = {} @@ -1674,6 +2081,12 @@ def replace_namespaced_pod_disruption_budget_with_http_info(self, name, namespac # 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, @@ -1682,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 @@ -1696,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 @@ -1727,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() @@ -1768,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' ] ) @@ -1781,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 = {} @@ -1802,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 = {} @@ -1826,6 +2268,12 @@ def replace_namespaced_pod_disruption_budget_status_with_http_info(self, name, n # 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, @@ -1834,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 5f7105b090..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.34 + 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 aa811e43b9..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_cluster_role_with_http_info(self, body, **kwargs): # 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 = {} @@ -288,6 +348,13 @@ def create_cluster_role_binding_with_http_info(self, body, **kwargs): # noqa: E # 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 = {} @@ -431,6 +526,13 @@ def create_namespaced_role_with_http_info(self, namespace, body, **kwargs): # n # 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 = {} @@ -574,6 +704,13 @@ def create_namespaced_role_binding_with_http_info(self, namespace, body, **kwarg # 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,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -628,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -671,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' ] ) @@ -684,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 = {} @@ -695,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -723,6 +893,12 @@ def delete_cluster_role_with_http_info(self, name, **kwargs): # 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, @@ -731,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 @@ -745,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -777,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -820,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' ] ) @@ -833,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 = {} @@ -844,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -872,6 +1081,12 @@ def delete_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E # 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, @@ -880,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 @@ -894,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -933,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -990,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' ] ) @@ -1008,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1052,6 +1315,11 @@ def delete_collection_cluster_role_with_http_info(self, **kwargs): # 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, @@ -1060,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 @@ -1074,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1113,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1170,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' ] ) @@ -1188,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1232,6 +1548,11 @@ def delete_collection_cluster_role_binding_with_http_info(self, **kwargs): # no # 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, @@ -1240,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 @@ -1254,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1294,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1353,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' ] ) @@ -1366,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 = {} @@ -1377,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1421,6 +1791,11 @@ def delete_collection_namespaced_role_with_http_info(self, namespace, **kwargs): # 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, @@ -1429,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 @@ -1443,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1483,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1542,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' ] ) @@ -1555,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 = {} @@ -1566,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1610,6 +2034,11 @@ def delete_collection_namespaced_role_binding_with_http_info(self, namespace, ** # 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, @@ -1618,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 @@ -1632,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1665,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1710,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' ] ) @@ -1723,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 = {} @@ -1740,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1768,6 +2231,12 @@ def delete_namespaced_role_with_http_info(self, name, namespace, **kwargs): # n # 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, @@ -1776,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 @@ -1790,29 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -1823,31 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -1868,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' ] ) @@ -1881,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 = {} @@ -1898,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1926,6 +2429,12 @@ def delete_namespaced_role_binding_with_http_info(self, name, namespace, **kwarg # 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, @@ -1934,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 @@ -1948,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 @@ -1972,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() @@ -1999,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' ] ) @@ -2018,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 = {} @@ -2031,6 +2558,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2039,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 @@ -2053,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 @@ -2088,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() @@ -2137,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' ] ) @@ -2155,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 = {} @@ -2191,6 +2763,11 @@ def list_cluster_role_with_http_info(self, **kwargs): # 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, @@ -2199,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 @@ -2213,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 @@ -2248,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() @@ -2297,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' ] ) @@ -2315,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 = {} @@ -2351,6 +2968,11 @@ def list_cluster_role_binding_with_http_info(self, **kwargs): # 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, @@ -2359,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 @@ -2373,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 @@ -2409,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() @@ -2460,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' ] ) @@ -2473,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 = {} @@ -2484,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 = {} @@ -2520,6 +3183,11 @@ def list_namespaced_role_with_http_info(self, namespace, **kwargs): # noqa: E50 # 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, @@ -2528,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 @@ -2542,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 @@ -2578,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() @@ -2629,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' ] ) @@ -2642,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 = {} @@ -2653,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 = {} @@ -2689,6 +3398,11 @@ def list_namespaced_role_binding_with_http_info(self, namespace, **kwargs): # n # 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, @@ -2697,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 @@ -2711,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 @@ -2746,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() @@ -2795,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' ] ) @@ -2813,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 = {} @@ -2849,6 +3603,11 @@ def list_role_binding_for_all_namespaces_with_http_info(self, **kwargs): # noqa # 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, @@ -2857,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 @@ -2871,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 @@ -2906,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() @@ -2955,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' ] ) @@ -2973,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 = {} @@ -3009,6 +3808,11 @@ def list_role_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -3017,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 @@ -3031,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 @@ -3062,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() @@ -3103,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' ] ) @@ -3116,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 = {} @@ -3131,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 = {} @@ -3155,12 +3989,22 @@ def patch_cluster_role_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -3169,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 @@ -3183,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 @@ -3214,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() @@ -3255,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' ] ) @@ -3268,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 = {} @@ -3283,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 = {} @@ -3307,12 +4181,22 @@ def patch_cluster_role_binding_with_http_info(self, name, body, **kwargs): # no ['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', 'application/apply-patch+cbor']) # 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, @@ -3321,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 @@ -3335,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 @@ -3367,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() @@ -3410,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' ] ) @@ -3423,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 = {} @@ -3444,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 = {} @@ -3468,12 +4383,22 @@ def patch_namespaced_role_with_http_info(self, name, namespace, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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, @@ -3482,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 @@ -3496,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 @@ -3528,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() @@ -3571,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' ] ) @@ -3584,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 = {} @@ -3605,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 = {} @@ -3629,12 +4585,22 @@ def patch_namespaced_role_binding_with_http_info(self, name, namespace, body, ** ['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', 'application/apply-patch+cbor']) # 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, @@ -3643,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 @@ -3657,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 @@ -3683,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() @@ -3714,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' ] ) @@ -3727,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 = {} @@ -3738,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 = {} @@ -3754,6 +4741,11 @@ def read_cluster_role_with_http_info(self, name, **kwargs): # 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, @@ -3762,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 @@ -3776,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 @@ -3802,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() @@ -3833,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' ] ) @@ -3846,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 = {} @@ -3857,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 = {} @@ -3873,6 +4886,11 @@ def read_cluster_role_binding_with_http_info(self, name, **kwargs): # noqa: E50 # 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, @@ -3881,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 @@ -3895,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 @@ -3922,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() @@ -3955,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' ] ) @@ -3968,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 = {} @@ -3985,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 = {} @@ -4001,6 +5041,11 @@ def read_namespaced_role_with_http_info(self, name, namespace, **kwargs): # noq # 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, @@ -4009,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 @@ -4023,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 @@ -4050,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() @@ -4083,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' ] ) @@ -4096,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 = {} @@ -4113,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 = {} @@ -4129,6 +5196,11 @@ def read_namespaced_role_binding_with_http_info(self, name, namespace, **kwargs) # 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, @@ -4137,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 @@ -4151,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 @@ -4181,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() @@ -4220,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' ] ) @@ -4233,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 = {} @@ -4248,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 = {} @@ -4272,6 +5372,12 @@ def replace_cluster_role_with_http_info(self, name, body, **kwargs): # noqa: E5 # 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, @@ -4280,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 @@ -4294,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 @@ -4324,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() @@ -4363,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' ] ) @@ -4376,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 = {} @@ -4391,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 = {} @@ -4415,6 +5549,12 @@ def replace_cluster_role_binding_with_http_info(self, name, body, **kwargs): # # 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, @@ -4423,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 @@ -4437,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 @@ -4468,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() @@ -4509,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' ] ) @@ -4522,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 = {} @@ -4543,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 = {} @@ -4567,6 +5736,12 @@ def replace_namespaced_role_with_http_info(self, name, namespace, body, **kwargs # 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, @@ -4575,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 @@ -4589,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 @@ -4620,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() @@ -4661,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' ] ) @@ -4674,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 = {} @@ -4695,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 = {} @@ -4719,6 +5923,12 @@ def replace_namespaced_role_binding_with_http_info(self, name, namespace, body, # 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, @@ -4727,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 9355aa8ccf..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.34 + 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 index abc10f8ca8..638572ce18 100644 --- a/kubernetes/client/api/resource_v1_api.py +++ b/kubernetes/client/api/resource_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_device_class(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1DeviceClass + :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 @@ -71,27 +80,42 @@ def create_device_class_with_http_info(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -108,7 +132,10 @@ def create_device_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_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_device_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 = {} @@ -154,6 +180,13 @@ def create_device_class_with_http_info(self, body, **kwargs): # 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, @@ -162,13 +195,14 @@ def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_claim # noqa: E501 @@ -176,26 +210,36 @@ def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: 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 ResourceV1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: ResourceV1ResourceClaim + :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 @@ -206,28 +250,44 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa 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 ResourceV1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -245,7 +305,10 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -258,12 +321,10 @@ def create_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -273,16 +334,16 @@ def create_namespaced_resource_claim_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 = {} @@ -297,6 +358,13 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa # 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, @@ -305,13 +373,14 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_claim_template # noqa: E501 @@ -319,26 +388,36 @@ def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): 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 V1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1ResourceClaimTemplate + :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 @@ -349,28 +428,44 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo 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 V1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -388,7 +483,10 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -401,12 +499,10 @@ def create_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -416,16 +512,16 @@ def create_namespaced_resource_claim_template_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 = {} @@ -440,6 +536,13 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo # 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, @@ -448,13 +551,14 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, body, **kwargs): # noqa: E501 """create_resource_slice # noqa: E501 @@ -462,25 +566,34 @@ def create_resource_slice(self, body, **kwargs): # 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 V1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1ResourceSlice + :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 @@ -491,27 +604,42 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # 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 V1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -528,7 +656,10 @@ def create_resource_slice_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' ] ) @@ -541,8 +672,7 @@ def create_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -550,16 +680,16 @@ def create_resource_slice_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 = {} @@ -574,6 +704,13 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # 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, @@ -582,13 +719,14 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, **kwargs): # noqa: E501 """delete_collection_device_class # noqa: E501 @@ -596,35 +734,54 @@ def delete_collection_device_class(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_device_class_with_http_info(**kwargs) # noqa: E501 @@ -635,37 +792,62 @@ def delete_collection_device_class_with_http_info(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -692,7 +874,10 @@ def delete_collection_device_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' ] ) @@ -710,36 +895,36 @@ def delete_collection_device_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 '_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -754,6 +939,11 @@ def delete_collection_device_class_with_http_info(self, **kwargs): # 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, @@ -762,13 +952,14 @@ def delete_collection_device_class_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_resource_claim(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_claim # noqa: E501 @@ -776,36 +967,56 @@ def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # n 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_claim_with_http_info(namespace, **kwargs) # noqa: E501 @@ -816,38 +1027,64 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -875,7 +1112,10 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -888,8 +1128,7 @@ def delete_collection_namespaced_resource_claim_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_claim`") # noqa: E501 collection_formats = {} @@ -899,36 +1138,36 @@ def delete_collection_namespaced_resource_claim_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -943,6 +1182,11 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, # 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, @@ -951,13 +1195,14 @@ def delete_collection_namespaced_resource_claim_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_resource_claim_template(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_claim_template # noqa: E501 @@ -965,36 +1210,56 @@ def delete_collection_namespaced_resource_claim_template(self, namespace, **kwar 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1005,38 +1270,64 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1064,7 +1355,10 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1077,8 +1371,7 @@ def delete_collection_namespaced_resource_claim_template_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_resource_claim_template`") # noqa: E501 collection_formats = {} @@ -1088,36 +1381,36 @@ def delete_collection_namespaced_resource_claim_template_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1132,6 +1425,11 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na # 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, @@ -1140,13 +1438,14 @@ def delete_collection_namespaced_resource_claim_template_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_resource_slice(self, **kwargs): # noqa: E501 """delete_collection_resource_slice # noqa: E501 @@ -1154,35 +1453,54 @@ def delete_collection_resource_slice(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_resource_slice_with_http_info(**kwargs) # noqa: E501 @@ -1193,37 +1511,62 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1250,7 +1593,10 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1268,36 +1614,36 @@ def delete_collection_resource_slice_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1312,6 +1658,11 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -1320,13 +1671,14 @@ def delete_collection_resource_slice_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_device_class(self, name, **kwargs): # noqa: E501 """delete_device_class # noqa: E501 @@ -1334,28 +1686,40 @@ def delete_device_class(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1DeviceClass + :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 @@ -1366,30 +1730,48 @@ def delete_device_class_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1409,7 +1791,10 @@ def delete_device_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' ] ) @@ -1422,8 +1807,7 @@ def delete_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -1433,20 +1817,20 @@ def delete_device_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1461,6 +1845,12 @@ def delete_device_class_with_http_info(self, name, **kwargs): # 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, @@ -1469,13 +1859,14 @@ def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_claim # noqa: E501 @@ -1483,29 +1874,42 @@ def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: ResourceV1ResourceClaim + :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 @@ -1516,31 +1920,50 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1561,7 +1984,10 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1574,12 +2000,10 @@ def delete_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -1591,20 +2015,20 @@ def delete_namespaced_resource_claim_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1619,6 +2043,12 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa # 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, @@ -1627,13 +2057,14 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_claim_template # noqa: E501 @@ -1641,29 +2072,42 @@ def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1ResourceClaimTemplate + :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 @@ -1674,31 +2118,50 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1719,7 +2182,10 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1732,12 +2198,10 @@ def delete_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -1749,20 +2213,20 @@ def delete_namespaced_resource_claim_template_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1777,6 +2241,12 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa # 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, @@ -1785,13 +2255,14 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, **kwargs): # noqa: E501 """delete_resource_slice # noqa: E501 @@ -1799,28 +2270,40 @@ def delete_resource_slice(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1ResourceSlice + :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 @@ -1831,30 +2314,48 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1874,7 +2375,10 @@ def delete_resource_slice_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' ] ) @@ -1887,8 +2391,7 @@ def delete_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -1898,20 +2401,20 @@ def delete_resource_slice_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1926,6 +2429,12 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # 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, @@ -1934,13 +2443,14 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -1948,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 @@ -1972,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() @@ -1999,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' ] ) @@ -2018,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 = {} @@ -2031,6 +2558,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2039,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_device_class(self, **kwargs): # noqa: E501 """list_device_class # noqa: E501 @@ -2053,31 +2586,46 @@ def list_device_class(self, **kwargs): # 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 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: V1DeviceClassList + :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 @@ -2088,33 +2636,54 @@ def list_device_class_with_http_info(self, **kwargs): # 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 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(V1DeviceClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2137,7 +2706,10 @@ def list_device_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' ] ) @@ -2155,30 +2727,30 @@ def list_device_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 = {} @@ -2191,6 +2763,11 @@ def list_device_class_with_http_info(self, **kwargs): # 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, @@ -2199,13 +2776,14 @@ def list_device_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeviceClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_claim # noqa: E501 @@ -2213,32 +2791,48 @@ def list_namespaced_resource_claim(self, namespace, **kwargs): # 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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: V1ResourceClaimList + :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 @@ -2249,34 +2843,56 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2300,7 +2916,10 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2313,8 +2932,7 @@ def list_namespaced_resource_claim_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_claim`") # noqa: E501 collection_formats = {} @@ -2324,30 +2942,30 @@ def list_namespaced_resource_claim_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 = {} @@ -2360,6 +2978,11 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # # 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, @@ -2368,13 +2991,14 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_claim_template # noqa: E501 @@ -2382,32 +3006,48 @@ def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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: V1ResourceClaimTemplateList + :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 @@ -2418,34 +3058,56 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2469,7 +3131,10 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2482,8 +3147,7 @@ def list_namespaced_resource_claim_template_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_resource_claim_template`") # noqa: E501 collection_formats = {} @@ -2493,30 +3157,30 @@ def list_namespaced_resource_claim_template_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 = {} @@ -2529,6 +3193,11 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw # 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, @@ -2537,13 +3206,14 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_claim_for_all_namespaces # noqa: E501 @@ -2551,31 +3221,46 @@ def list_resource_claim_for_all_namespaces(self, **kwargs): # 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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: V1ResourceClaimList + :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 @@ -2586,33 +3271,54 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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(V1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2635,7 +3341,10 @@ def list_resource_claim_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' ] ) @@ -2653,30 +3362,30 @@ def list_resource_claim_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 = {} @@ -2689,6 +3398,11 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no # 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, @@ -2697,13 +3411,14 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_claim_template_for_all_namespaces # noqa: E501 @@ -2711,31 +3426,46 @@ def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E5 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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: V1ResourceClaimTemplateList + :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 @@ -2746,33 +3476,54 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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(V1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2795,7 +3546,10 @@ def list_resource_claim_template_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' ] ) @@ -2813,30 +3567,30 @@ def list_resource_claim_template_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 = {} @@ -2849,6 +3603,11 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg # 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, @@ -2857,13 +3616,14 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_slice(self, **kwargs): # noqa: E501 """list_resource_slice # noqa: E501 @@ -2871,31 +3631,46 @@ def list_resource_slice(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1ResourceSliceList + :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 @@ -2906,33 +3681,54 @@ def list_resource_slice_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2955,7 +3751,10 @@ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2973,30 +3772,30 @@ def list_resource_slice_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 = {} @@ -3009,6 +3808,11 @@ def list_resource_slice_with_http_info(self, **kwargs): # 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, @@ -3017,13 +3821,14 @@ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceSliceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, body, **kwargs): # noqa: E501 """patch_device_class # noqa: E501 @@ -3031,27 +3836,38 @@ def patch_device_class(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (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 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: V1DeviceClass + :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 @@ -3062,29 +3878,46 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (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 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. - :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3103,7 +3936,10 @@ def patch_device_class_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' ] ) @@ -3116,12 +3952,10 @@ def patch_device_class_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_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -3131,18 +3965,18 @@ def patch_device_class_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 = {} @@ -3155,12 +3989,22 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1DeviceClass", + 201: "V1DeviceClass", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1/deviceclasses/{name}', 'PATCH', path_params, @@ -3169,13 +4013,14 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim # noqa: E501 @@ -3183,28 +4028,40 @@ def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # n 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 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: ResourceV1ResourceClaim + :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 @@ -3215,30 +4072,48 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, 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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3258,7 +4133,10 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3271,16 +4149,13 @@ def patch_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -3292,18 +4167,18 @@ def patch_namespaced_resource_claim_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 = {} @@ -3316,12 +4191,22 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', path_params, @@ -3330,13 +4215,14 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim_status # noqa: E501 @@ -3344,28 +4230,40 @@ def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs 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 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: ResourceV1ResourceClaim + :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 @@ -3376,30 +4274,48 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, 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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3419,7 +4335,10 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3432,16 +4351,13 @@ def patch_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -3453,18 +4369,18 @@ def patch_namespaced_resource_claim_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 = {} @@ -3477,12 +4393,22 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, ['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', 'application/apply-patch+cbor']) # 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: "ResourceV1ResourceClaim", + 201: "ResourceV1ResourceClaim", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', path_params, @@ -3491,13 +4417,14 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim_template # noqa: E501 @@ -3505,28 +4432,40 @@ def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwar 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 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: V1ResourceClaimTemplate + :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 @@ -3537,30 +4476,48 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac 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 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. - :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3580,7 +4537,10 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3593,16 +4553,13 @@ def patch_namespaced_resource_claim_template_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_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 + if self.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 ('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_claim_template`") # noqa: E501 collection_formats = {} @@ -3614,18 +4571,18 @@ def patch_namespaced_resource_claim_template_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 = {} @@ -3638,12 +4595,22 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac ['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', 'application/apply-patch+cbor']) # 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: "V1ResourceClaimTemplate", + 201: "V1ResourceClaimTemplate", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', path_params, @@ -3652,13 +4619,14 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, body, **kwargs): # noqa: E501 """patch_resource_slice # noqa: E501 @@ -3666,27 +4634,38 @@ def patch_resource_slice(self, name, body, **kwargs): # 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 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: V1ResourceSlice + :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 @@ -3697,29 +4676,46 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 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 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. - :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3738,7 +4734,10 @@ def patch_resource_slice_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' ] ) @@ -3751,12 +4750,10 @@ def patch_resource_slice_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_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 + if self.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 = {} @@ -3766,18 +4763,18 @@ def patch_resource_slice_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 = {} @@ -3790,12 +4787,22 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 ['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', 'application/apply-patch+cbor']) # 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: "V1ResourceSlice", + 201: "V1ResourceSlice", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1/resourceslices/{name}', 'PATCH', path_params, @@ -3804,13 +4811,14 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, **kwargs): # noqa: E501 """read_device_class # noqa: E501 @@ -3818,22 +4826,28 @@ def read_device_class(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then 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 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: V1DeviceClass + :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 @@ -3844,24 +4858,36 @@ def read_device_class_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then 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 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. - :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3875,7 +4901,10 @@ def read_device_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' ] ) @@ -3888,8 +4917,7 @@ def read_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -3899,10 +4927,10 @@ def read_device_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 = {} @@ -3915,6 +4943,11 @@ def read_device_class_with_http_info(self, name, **kwargs): # 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, @@ -3923,13 +4956,14 @@ def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim # noqa: E501 @@ -3937,23 +4971,30 @@ def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E5 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 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: ResourceV1ResourceClaim + :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 @@ -3964,25 +5005,38 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg 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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3997,7 +5051,10 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4010,12 +5067,10 @@ def read_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -4027,10 +5082,10 @@ def read_namespaced_resource_claim_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 = {} @@ -4043,6 +5098,11 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg # 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, @@ -4051,13 +5111,14 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim_status # noqa: E501 @@ -4065,23 +5126,30 @@ def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # n 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 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: ResourceV1ResourceClaim + :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 @@ -4092,25 +5160,38 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, 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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4125,7 +5206,10 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4138,12 +5222,10 @@ def read_namespaced_resource_claim_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_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_resource_claim_status`") # noqa: E501 collection_formats = {} @@ -4155,10 +5237,10 @@ def read_namespaced_resource_claim_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 = {} @@ -4171,6 +5253,11 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, # 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, @@ -4179,13 +5266,14 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim_template # noqa: E501 @@ -4193,23 +5281,30 @@ def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # 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 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: V1ResourceClaimTemplate + :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 @@ -4220,25 +5315,38 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace 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 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. - :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4253,7 +5361,10 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4266,12 +5377,10 @@ def read_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -4283,10 +5392,10 @@ def read_namespaced_resource_claim_template_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 = {} @@ -4299,6 +5408,11 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace # 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, @@ -4307,13 +5421,14 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, **kwargs): # noqa: E501 """read_resource_slice # noqa: E501 @@ -4321,22 +5436,28 @@ def read_resource_slice(self, name, **kwargs): # 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 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: V1ResourceSlice + :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 @@ -4347,24 +5468,36 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # 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 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. - :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4378,7 +5511,10 @@ def read_resource_slice_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' ] ) @@ -4391,8 +5527,7 @@ def read_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -4402,10 +5537,10 @@ def read_resource_slice_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 = {} @@ -4418,6 +5553,11 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # 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, @@ -4426,13 +5566,14 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, body, **kwargs): # noqa: E501 """replace_device_class # noqa: E501 @@ -4440,26 +5581,36 @@ def replace_device_class(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param V1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1DeviceClass + :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 @@ -4470,28 +5621,44 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param V1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4509,7 +5676,10 @@ def replace_device_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' ] ) @@ -4522,12 +5692,10 @@ def replace_device_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 `replace_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -4537,16 +5705,16 @@ def replace_device_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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4561,6 +5729,12 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 # 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, @@ -4569,13 +5743,14 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim # noqa: E501 @@ -4583,27 +5758,38 @@ def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # 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 ResourceV1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: ResourceV1ResourceClaim + :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 @@ -4614,29 +5800,46 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body 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 ResourceV1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4655,7 +5858,10 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4668,16 +5874,13 @@ def replace_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -4689,16 +5892,16 @@ def replace_namespaced_resource_claim_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 = {} @@ -4713,6 +5916,12 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body # 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, @@ -4721,13 +5930,14 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim_status # noqa: E501 @@ -4735,27 +5945,38 @@ def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwar 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 ResourceV1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: ResourceV1ResourceClaim + :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 @@ -4766,29 +5987,46 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac 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 ResourceV1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(ResourceV1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4807,7 +6045,10 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4820,16 +6061,13 @@ def replace_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -4841,16 +6079,16 @@ def replace_namespaced_resource_claim_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 = {} @@ -4865,6 +6103,12 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac # 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, @@ -4873,13 +6117,14 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceV1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim_template # noqa: E501 @@ -4887,27 +6132,38 @@ def replace_namespaced_resource_claim_template(self, name, namespace, body, **kw 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 V1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1ResourceClaimTemplate + :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 @@ -4918,29 +6174,46 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp 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 V1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4959,7 +6232,10 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4972,16 +6248,13 @@ def replace_namespaced_resource_claim_template_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_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 + if self.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 ('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_claim_template`") # noqa: E501 collection_formats = {} @@ -4993,16 +6266,16 @@ def replace_namespaced_resource_claim_template_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 = {} @@ -5017,6 +6290,12 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp # 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, @@ -5025,13 +6304,14 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, body, **kwargs): # noqa: E501 """replace_resource_slice # noqa: E501 @@ -5039,26 +6319,36 @@ def replace_resource_slice(self, name, body, **kwargs): # 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 V1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1ResourceSlice + :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 @@ -5069,28 +6359,44 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: 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 V1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5108,7 +6414,10 @@ def replace_resource_slice_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' ] ) @@ -5121,12 +6430,10 @@ def replace_resource_slice_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_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 + if self.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 = {} @@ -5136,16 +6443,16 @@ def replace_resource_slice_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 = {} @@ -5160,6 +6467,12 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: # 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, @@ -5168,10 +6481,11 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_v1alpha3_api.py b/kubernetes/client/api/resource_v1alpha3_api.py index 8d30c66667..b2d79c46fb 100644 --- a/kubernetes/client/api/resource_v1alpha3_api.py +++ b/kubernetes/client/api/resource_v1alpha3_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_device_taint_rule(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1alpha3DeviceTaintRule body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1alpha3DeviceTaintRule + :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 @@ -71,27 +80,42 @@ def create_device_taint_rule_with_http_info(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1alpha3DeviceTaintRule body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -108,7 +132,10 @@ def create_device_taint_rule_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_device_taint_rule_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_device_taint_rule`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_device_taint_rule_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 = {} @@ -154,6 +180,13 @@ def create_device_taint_rule_with_http_info(self, body, **kwargs): # 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, @@ -162,13 +195,14 @@ def create_device_taint_rule_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha3DeviceTaintRule', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_taint_rule(self, **kwargs): # noqa: E501 """delete_collection_device_taint_rule # noqa: E501 @@ -176,35 +210,54 @@ def delete_collection_device_taint_rule(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_device_taint_rule_with_http_info(**kwargs) # noqa: E501 @@ -215,37 +268,62 @@ def delete_collection_device_taint_rule_with_http_info(self, **kwargs): # noqa: 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -272,7 +350,10 @@ def delete_collection_device_taint_rule_with_http_info(self, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -290,36 +371,36 @@ def delete_collection_device_taint_rule_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -334,6 +415,11 @@ def delete_collection_device_taint_rule_with_http_info(self, **kwargs): # noqa: # 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, @@ -342,13 +428,14 @@ def delete_collection_device_taint_rule_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_device_taint_rule(self, name, **kwargs): # noqa: E501 """delete_device_taint_rule # noqa: E501 @@ -356,28 +443,40 @@ def delete_device_taint_rule(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1alpha3DeviceTaintRule + :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 @@ -388,30 +487,48 @@ def delete_device_taint_rule_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -431,7 +548,10 @@ def delete_device_taint_rule_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' ] ) @@ -444,8 +564,7 @@ def delete_device_taint_rule_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_device_taint_rule`") # noqa: E501 collection_formats = {} @@ -455,20 +574,20 @@ def delete_device_taint_rule_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -483,6 +602,12 @@ def delete_device_taint_rule_with_http_info(self, name, **kwargs): # 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, @@ -491,13 +616,14 @@ def delete_device_taint_rule_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha3DeviceTaintRule', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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_device_taint_rule(self, **kwargs): # noqa: E501 """list_device_taint_rule # noqa: E501 @@ -610,31 +759,46 @@ def list_device_taint_rule(self, **kwargs): # 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 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: V1alpha3DeviceTaintRuleList + :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 @@ -645,33 +809,54 @@ def list_device_taint_rule_with_http_info(self, **kwargs): # 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 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(V1alpha3DeviceTaintRuleList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -694,7 +879,10 @@ def list_device_taint_rule_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -712,30 +900,30 @@ def list_device_taint_rule_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 = {} @@ -748,6 +936,11 @@ def list_device_taint_rule_with_http_info(self, **kwargs): # 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, @@ -756,13 +949,14 @@ def list_device_taint_rule_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha3DeviceTaintRuleList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_taint_rule(self, name, body, **kwargs): # noqa: E501 """patch_device_taint_rule # noqa: E501 @@ -770,27 +964,38 @@ def patch_device_taint_rule(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (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 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: V1alpha3DeviceTaintRule + :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 @@ -801,29 +1006,46 @@ def patch_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (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 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. - :return: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -842,7 +1064,10 @@ def patch_device_taint_rule_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' ] ) @@ -855,12 +1080,10 @@ def patch_device_taint_rule_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_device_taint_rule`") # noqa: E501 # verify the required parameter 'body' is set - if 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_device_taint_rule`") # noqa: E501 collection_formats = {} @@ -870,18 +1093,18 @@ def patch_device_taint_rule_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 = {} @@ -894,12 +1117,22 @@ def patch_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: ['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', 'application/apply-patch+cbor']) # 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: "V1alpha3DeviceTaintRule", + 201: "V1alpha3DeviceTaintRule", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}', 'PATCH', path_params, @@ -908,13 +1141,206 @@ def patch_device_taint_rule_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha3DeviceTaintRule', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_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 @@ -922,22 +1348,28 @@ def read_device_taint_rule(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (required) - :param str pretty: If 'true', then 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 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: V1alpha3DeviceTaintRule + :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 @@ -948,24 +1380,36 @@ def read_device_taint_rule_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (required) - :param str pretty: If 'true', then 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 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. - :return: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -979,7 +1423,10 @@ def read_device_taint_rule_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' ] ) @@ -992,8 +1439,7 @@ def read_device_taint_rule_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_device_taint_rule`") # noqa: E501 collection_formats = {} @@ -1003,10 +1449,10 @@ def read_device_taint_rule_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 = {} @@ -1019,6 +1465,11 @@ def read_device_taint_rule_with_http_info(self, name, **kwargs): # 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, @@ -1027,13 +1478,159 @@ def read_device_taint_rule_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha3DeviceTaintRule', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_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 @@ -1041,26 +1638,36 @@ def replace_device_taint_rule(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (required) - :param V1alpha3DeviceTaintRule body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1alpha3DeviceTaintRule + :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 @@ -1071,28 +1678,44 @@ def replace_device_taint_rule_with_http_info(self, name, body, **kwargs): # noq 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceTaintRule (required) - :param V1alpha3DeviceTaintRule body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1alpha3DeviceTaintRule, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1110,7 +1733,10 @@ def replace_device_taint_rule_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' ] ) @@ -1123,12 +1749,10 @@ def replace_device_taint_rule_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_device_taint_rule`") # noqa: E501 # verify the required parameter 'body' is set - if 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_device_taint_rule`") # noqa: E501 collection_formats = {} @@ -1138,16 +1762,16 @@ def replace_device_taint_rule_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 = {} @@ -1162,6 +1786,12 @@ def replace_device_taint_rule_with_http_info(self, name, body, **kwargs): # noq # 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, @@ -1170,10 +1800,188 @@ def replace_device_taint_rule_with_http_info(self, name, body, **kwargs): # noq body=body_params, post_params=form_params, files=local_var_files, - response_type='V1alpha3DeviceTaintRule', # noqa: E501 + response_types_map=response_types_map, + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_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) + 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 index 85432de610..3e8ab068df 100644 --- a/kubernetes/client/api/resource_v1beta1_api.py +++ b/kubernetes/client/api/resource_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_device_class(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1beta1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1DeviceClass + :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 @@ -71,27 +80,42 @@ def create_device_class_with_http_info(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1beta1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -108,7 +132,10 @@ def create_device_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_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_device_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 = {} @@ -154,6 +180,13 @@ def create_device_class_with_http_info(self, body, **kwargs): # 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, @@ -162,13 +195,14 @@ def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_claim # noqa: E501 @@ -176,26 +210,36 @@ def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: 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 V1beta1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ResourceClaim + :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 @@ -206,28 +250,44 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa 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 V1beta1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -245,7 +305,10 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -258,12 +321,10 @@ def create_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -273,16 +334,16 @@ def create_namespaced_resource_claim_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 = {} @@ -297,6 +358,13 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa # 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, @@ -305,13 +373,14 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_claim_template # noqa: E501 @@ -319,26 +388,36 @@ def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): 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 V1beta1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ResourceClaimTemplate + :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 @@ -349,28 +428,44 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo 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 V1beta1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -388,7 +483,10 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -401,12 +499,10 @@ def create_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -416,16 +512,16 @@ def create_namespaced_resource_claim_template_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 = {} @@ -440,6 +536,13 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo # 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, @@ -448,13 +551,14 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, body, **kwargs): # noqa: E501 """create_resource_slice # noqa: E501 @@ -462,25 +566,34 @@ def create_resource_slice(self, body, **kwargs): # 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 V1beta1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1ResourceSlice + :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 @@ -491,27 +604,42 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # 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 V1beta1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -528,7 +656,10 @@ def create_resource_slice_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' ] ) @@ -541,8 +672,7 @@ def create_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -550,16 +680,16 @@ def create_resource_slice_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 = {} @@ -574,6 +704,13 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # 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, @@ -582,13 +719,14 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, **kwargs): # noqa: E501 """delete_collection_device_class # noqa: E501 @@ -596,35 +734,54 @@ def delete_collection_device_class(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_device_class_with_http_info(**kwargs) # noqa: E501 @@ -635,37 +792,62 @@ def delete_collection_device_class_with_http_info(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -692,7 +874,10 @@ def delete_collection_device_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' ] ) @@ -710,36 +895,36 @@ def delete_collection_device_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 '_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -754,6 +939,11 @@ def delete_collection_device_class_with_http_info(self, **kwargs): # 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, @@ -762,13 +952,14 @@ def delete_collection_device_class_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_resource_claim(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_claim # noqa: E501 @@ -776,36 +967,56 @@ def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # n 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_claim_with_http_info(namespace, **kwargs) # noqa: E501 @@ -816,38 +1027,64 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -875,7 +1112,10 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -888,8 +1128,7 @@ def delete_collection_namespaced_resource_claim_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_claim`") # noqa: E501 collection_formats = {} @@ -899,36 +1138,36 @@ def delete_collection_namespaced_resource_claim_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -943,6 +1182,11 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, # 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, @@ -951,13 +1195,14 @@ def delete_collection_namespaced_resource_claim_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_resource_claim_template(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_claim_template # noqa: E501 @@ -965,36 +1210,56 @@ def delete_collection_namespaced_resource_claim_template(self, namespace, **kwar 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1005,38 +1270,64 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1064,7 +1355,10 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1077,8 +1371,7 @@ def delete_collection_namespaced_resource_claim_template_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_resource_claim_template`") # noqa: E501 collection_formats = {} @@ -1088,36 +1381,36 @@ def delete_collection_namespaced_resource_claim_template_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1132,6 +1425,11 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na # 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, @@ -1140,13 +1438,14 @@ def delete_collection_namespaced_resource_claim_template_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_resource_slice(self, **kwargs): # noqa: E501 """delete_collection_resource_slice # noqa: E501 @@ -1154,35 +1453,54 @@ def delete_collection_resource_slice(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_resource_slice_with_http_info(**kwargs) # noqa: E501 @@ -1193,37 +1511,62 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1250,7 +1593,10 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1268,36 +1614,36 @@ def delete_collection_resource_slice_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1312,6 +1658,11 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -1320,13 +1671,14 @@ def delete_collection_resource_slice_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_device_class(self, name, **kwargs): # noqa: E501 """delete_device_class # noqa: E501 @@ -1334,28 +1686,40 @@ def delete_device_class(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta1DeviceClass + :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 @@ -1366,30 +1730,48 @@ def delete_device_class_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1409,7 +1791,10 @@ def delete_device_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' ] ) @@ -1422,8 +1807,7 @@ def delete_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -1433,20 +1817,20 @@ def delete_device_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1461,6 +1845,12 @@ def delete_device_class_with_http_info(self, name, **kwargs): # 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, @@ -1469,13 +1859,14 @@ def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_claim # noqa: E501 @@ -1483,29 +1874,42 @@ def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta1ResourceClaim + :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 @@ -1516,31 +1920,50 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1561,7 +1984,10 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1574,12 +2000,10 @@ def delete_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -1591,20 +2015,20 @@ def delete_namespaced_resource_claim_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1619,6 +2043,12 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa # 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, @@ -1627,13 +2057,14 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_claim_template # noqa: E501 @@ -1641,29 +2072,42 @@ def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta1ResourceClaimTemplate + :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 @@ -1674,31 +2118,50 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1719,7 +2182,10 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1732,12 +2198,10 @@ def delete_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -1749,20 +2213,20 @@ def delete_namespaced_resource_claim_template_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1777,6 +2241,12 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa # 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, @@ -1785,13 +2255,14 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, **kwargs): # noqa: E501 """delete_resource_slice # noqa: E501 @@ -1799,28 +2270,40 @@ def delete_resource_slice(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta1ResourceSlice + :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 @@ -1831,30 +2314,48 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1874,7 +2375,10 @@ def delete_resource_slice_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' ] ) @@ -1887,8 +2391,7 @@ def delete_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -1898,20 +2401,20 @@ def delete_resource_slice_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1926,6 +2429,12 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # 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, @@ -1934,13 +2443,14 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -1948,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 @@ -1972,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() @@ -1999,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' ] ) @@ -2018,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 = {} @@ -2031,6 +2558,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2039,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_device_class(self, **kwargs): # noqa: E501 """list_device_class # noqa: E501 @@ -2053,31 +2586,46 @@ def list_device_class(self, **kwargs): # 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 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: V1beta1DeviceClassList + :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 @@ -2088,33 +2636,54 @@ def list_device_class_with_http_info(self, **kwargs): # 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 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(V1beta1DeviceClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2137,7 +2706,10 @@ def list_device_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' ] ) @@ -2155,30 +2727,30 @@ def list_device_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 = {} @@ -2191,6 +2763,11 @@ def list_device_class_with_http_info(self, **kwargs): # 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, @@ -2199,13 +2776,14 @@ def list_device_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1DeviceClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_claim # noqa: E501 @@ -2213,32 +2791,48 @@ def list_namespaced_resource_claim(self, namespace, **kwargs): # 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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: V1beta1ResourceClaimList + :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 @@ -2249,34 +2843,56 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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(V1beta1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2300,7 +2916,10 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2313,8 +2932,7 @@ def list_namespaced_resource_claim_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_claim`") # noqa: E501 collection_formats = {} @@ -2324,30 +2942,30 @@ def list_namespaced_resource_claim_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 = {} @@ -2360,6 +2978,11 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # # 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, @@ -2368,13 +2991,14 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_claim_template # noqa: E501 @@ -2382,32 +3006,48 @@ def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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: V1beta1ResourceClaimTemplateList + :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 @@ -2418,34 +3058,56 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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(V1beta1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2469,7 +3131,10 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2482,8 +3147,7 @@ def list_namespaced_resource_claim_template_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_resource_claim_template`") # noqa: E501 collection_formats = {} @@ -2493,30 +3157,30 @@ def list_namespaced_resource_claim_template_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 = {} @@ -2529,6 +3193,11 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw # 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, @@ -2537,13 +3206,14 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_claim_for_all_namespaces # noqa: E501 @@ -2551,31 +3221,46 @@ def list_resource_claim_for_all_namespaces(self, **kwargs): # 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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: V1beta1ResourceClaimList + :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 @@ -2586,33 +3271,54 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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(V1beta1ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2635,7 +3341,10 @@ def list_resource_claim_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' ] ) @@ -2653,30 +3362,30 @@ def list_resource_claim_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 = {} @@ -2689,6 +3398,11 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no # 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, @@ -2697,13 +3411,14 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_claim_template_for_all_namespaces # noqa: E501 @@ -2711,31 +3426,46 @@ def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E5 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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: V1beta1ResourceClaimTemplateList + :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 @@ -2746,33 +3476,54 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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(V1beta1ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2795,7 +3546,10 @@ def list_resource_claim_template_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' ] ) @@ -2813,30 +3567,30 @@ def list_resource_claim_template_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 = {} @@ -2849,6 +3603,11 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg # 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, @@ -2857,13 +3616,14 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_slice(self, **kwargs): # noqa: E501 """list_resource_slice # noqa: E501 @@ -2871,31 +3631,46 @@ def list_resource_slice(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1beta1ResourceSliceList + :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 @@ -2906,33 +3681,54 @@ def list_resource_slice_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1beta1ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2955,7 +3751,10 @@ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2973,30 +3772,30 @@ def list_resource_slice_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 = {} @@ -3009,6 +3808,11 @@ def list_resource_slice_with_http_info(self, **kwargs): # 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, @@ -3017,13 +3821,14 @@ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceSliceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, body, **kwargs): # noqa: E501 """patch_device_class # noqa: E501 @@ -3031,27 +3836,38 @@ def patch_device_class(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (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 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: V1beta1DeviceClass + :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 @@ -3062,29 +3878,46 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (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 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. - :return: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3103,7 +3936,10 @@ def patch_device_class_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' ] ) @@ -3116,12 +3952,10 @@ def patch_device_class_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_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -3131,18 +3965,18 @@ def patch_device_class_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 = {} @@ -3155,12 +3989,22 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1beta1DeviceClass", + 201: "V1beta1DeviceClass", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta1/deviceclasses/{name}', 'PATCH', path_params, @@ -3169,13 +4013,14 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim # noqa: E501 @@ -3183,28 +4028,40 @@ def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # n 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 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: V1beta1ResourceClaim + :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 @@ -3215,30 +4072,48 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, 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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3258,7 +4133,10 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3271,16 +4149,13 @@ def patch_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -3292,18 +4167,18 @@ def patch_namespaced_resource_claim_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 = {} @@ -3316,12 +4191,22 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', path_params, @@ -3330,13 +4215,14 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim_status # noqa: E501 @@ -3344,28 +4230,40 @@ def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs 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 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: V1beta1ResourceClaim + :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 @@ -3376,30 +4274,48 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, 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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3419,7 +4335,10 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3432,16 +4351,13 @@ def patch_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -3453,18 +4369,18 @@ def patch_namespaced_resource_claim_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 = {} @@ -3477,12 +4393,22 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, ['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', 'application/apply-patch+cbor']) # 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: "V1beta1ResourceClaim", + 201: "V1beta1ResourceClaim", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', path_params, @@ -3491,13 +4417,14 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim_template # noqa: E501 @@ -3505,28 +4432,40 @@ def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwar 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 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: V1beta1ResourceClaimTemplate + :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 @@ -3537,30 +4476,48 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac 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 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. - :return: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3580,7 +4537,10 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3593,16 +4553,13 @@ def patch_namespaced_resource_claim_template_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_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 + if self.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 ('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_claim_template`") # noqa: E501 collection_formats = {} @@ -3614,18 +4571,18 @@ def patch_namespaced_resource_claim_template_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 = {} @@ -3638,12 +4595,22 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac ['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', 'application/apply-patch+cbor']) # 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: "V1beta1ResourceClaimTemplate", + 201: "V1beta1ResourceClaimTemplate", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta1/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', path_params, @@ -3652,13 +4619,14 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, body, **kwargs): # noqa: E501 """patch_resource_slice # noqa: E501 @@ -3666,27 +4634,38 @@ def patch_resource_slice(self, name, body, **kwargs): # 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 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: V1beta1ResourceSlice + :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 @@ -3697,29 +4676,46 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 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 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. - :return: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3738,7 +4734,10 @@ def patch_resource_slice_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' ] ) @@ -3751,12 +4750,10 @@ def patch_resource_slice_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_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 + if self.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 = {} @@ -3766,18 +4763,18 @@ def patch_resource_slice_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 = {} @@ -3790,12 +4787,22 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 ['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', 'application/apply-patch+cbor']) # 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: "V1beta1ResourceSlice", + 201: "V1beta1ResourceSlice", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta1/resourceslices/{name}', 'PATCH', path_params, @@ -3804,13 +4811,14 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, **kwargs): # noqa: E501 """read_device_class # noqa: E501 @@ -3818,22 +4826,28 @@ def read_device_class(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then 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 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: V1beta1DeviceClass + :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 @@ -3844,24 +4858,36 @@ def read_device_class_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then 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 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. - :return: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3875,7 +4901,10 @@ def read_device_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' ] ) @@ -3888,8 +4917,7 @@ def read_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -3899,10 +4927,10 @@ def read_device_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 = {} @@ -3915,6 +4943,11 @@ def read_device_class_with_http_info(self, name, **kwargs): # 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, @@ -3923,13 +4956,14 @@ def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim # noqa: E501 @@ -3937,23 +4971,30 @@ def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E5 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 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: V1beta1ResourceClaim + :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 @@ -3964,25 +5005,38 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg 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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3997,7 +5051,10 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4010,12 +5067,10 @@ def read_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -4027,10 +5082,10 @@ def read_namespaced_resource_claim_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 = {} @@ -4043,6 +5098,11 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg # 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, @@ -4051,13 +5111,14 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim_status # noqa: E501 @@ -4065,23 +5126,30 @@ def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # n 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 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: V1beta1ResourceClaim + :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 @@ -4092,25 +5160,38 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, 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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4125,7 +5206,10 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4138,12 +5222,10 @@ def read_namespaced_resource_claim_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_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_resource_claim_status`") # noqa: E501 collection_formats = {} @@ -4155,10 +5237,10 @@ def read_namespaced_resource_claim_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 = {} @@ -4171,6 +5253,11 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, # 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, @@ -4179,13 +5266,14 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim_template # noqa: E501 @@ -4193,23 +5281,30 @@ def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # 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 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: V1beta1ResourceClaimTemplate + :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 @@ -4220,25 +5315,38 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace 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 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. - :return: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4253,7 +5361,10 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4266,12 +5377,10 @@ def read_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -4283,10 +5392,10 @@ def read_namespaced_resource_claim_template_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 = {} @@ -4299,6 +5408,11 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace # 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, @@ -4307,13 +5421,14 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, **kwargs): # noqa: E501 """read_resource_slice # noqa: E501 @@ -4321,22 +5436,28 @@ def read_resource_slice(self, name, **kwargs): # 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 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: V1beta1ResourceSlice + :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 @@ -4347,24 +5468,36 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # 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 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. - :return: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4378,7 +5511,10 @@ def read_resource_slice_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' ] ) @@ -4391,8 +5527,7 @@ def read_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -4402,10 +5537,10 @@ def read_resource_slice_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 = {} @@ -4418,6 +5553,11 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # 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, @@ -4426,13 +5566,14 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, body, **kwargs): # noqa: E501 """replace_device_class # noqa: E501 @@ -4440,26 +5581,36 @@ def replace_device_class(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param V1beta1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1DeviceClass + :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 @@ -4470,28 +5621,44 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param V1beta1DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4509,7 +5676,10 @@ def replace_device_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' ] ) @@ -4522,12 +5692,10 @@ def replace_device_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 `replace_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -4537,16 +5705,16 @@ def replace_device_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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4561,6 +5729,12 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 # 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, @@ -4569,13 +5743,14 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim # noqa: E501 @@ -4583,27 +5758,38 @@ def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # 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 V1beta1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1ResourceClaim + :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 @@ -4614,29 +5800,46 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body 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 V1beta1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4655,7 +5858,10 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4668,16 +5874,13 @@ def replace_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -4689,16 +5892,16 @@ def replace_namespaced_resource_claim_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 = {} @@ -4713,6 +5916,12 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body # 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, @@ -4721,13 +5930,14 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim_status # noqa: E501 @@ -4735,27 +5945,38 @@ def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwar 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 V1beta1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1ResourceClaim + :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 @@ -4766,29 +5987,46 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac 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 V1beta1ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4807,7 +6045,10 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4820,16 +6061,13 @@ def replace_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -4841,16 +6079,16 @@ def replace_namespaced_resource_claim_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 = {} @@ -4865,6 +6103,12 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac # 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, @@ -4873,13 +6117,14 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim_template # noqa: E501 @@ -4887,27 +6132,38 @@ def replace_namespaced_resource_claim_template(self, name, namespace, body, **kw 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 V1beta1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1ResourceClaimTemplate + :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 @@ -4918,29 +6174,46 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp 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 V1beta1ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4959,7 +6232,10 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4972,16 +6248,13 @@ def replace_namespaced_resource_claim_template_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_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 + if self.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 ('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_claim_template`") # noqa: E501 collection_formats = {} @@ -4993,16 +6266,16 @@ def replace_namespaced_resource_claim_template_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 = {} @@ -5017,6 +6290,12 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp # 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, @@ -5025,13 +6304,14 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, body, **kwargs): # noqa: E501 """replace_resource_slice # noqa: E501 @@ -5039,26 +6319,36 @@ def replace_resource_slice(self, name, body, **kwargs): # 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 V1beta1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1ResourceSlice + :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 @@ -5069,28 +6359,44 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: 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 V1beta1ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5108,7 +6414,10 @@ def replace_resource_slice_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' ] ) @@ -5121,12 +6430,10 @@ def replace_resource_slice_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_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 + if self.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 = {} @@ -5136,16 +6443,16 @@ def replace_resource_slice_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 = {} @@ -5160,6 +6467,12 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: # 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, @@ -5168,10 +6481,11 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_v1beta2_api.py b/kubernetes/client/api/resource_v1beta2_api.py index ed48b28742..a859864556 100644 --- a/kubernetes/client/api/resource_v1beta2_api.py +++ b/kubernetes/client/api/resource_v1beta2_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_device_class(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1beta2DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta2DeviceClass + :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 @@ -71,27 +80,42 @@ def create_device_class_with_http_info(self, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param V1beta2DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -108,7 +132,10 @@ def create_device_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_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_device_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 = {} @@ -154,6 +180,13 @@ def create_device_class_with_http_info(self, body, **kwargs): # 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, @@ -162,13 +195,14 @@ def create_device_class_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_claim # noqa: E501 @@ -176,26 +210,36 @@ def create_namespaced_resource_claim(self, namespace, body, **kwargs): # noqa: 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 V1beta2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta2ResourceClaim + :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 @@ -206,28 +250,44 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa 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 V1beta2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -245,7 +305,10 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -258,12 +321,10 @@ def create_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -273,16 +334,16 @@ def create_namespaced_resource_claim_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 = {} @@ -297,6 +358,13 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa # 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, @@ -305,13 +373,14 @@ def create_namespaced_resource_claim_with_http_info(self, namespace, body, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, namespace, body, **kwargs): # noqa: E501 """create_namespaced_resource_claim_template # noqa: E501 @@ -319,26 +388,36 @@ def create_namespaced_resource_claim_template(self, namespace, body, **kwargs): 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 V1beta2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta2ResourceClaimTemplate + :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 @@ -349,28 +428,44 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo 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 V1beta2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -388,7 +483,10 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -401,12 +499,10 @@ def create_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -416,16 +512,16 @@ def create_namespaced_resource_claim_template_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 = {} @@ -440,6 +536,13 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo # 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, @@ -448,13 +551,14 @@ def create_namespaced_resource_claim_template_with_http_info(self, namespace, bo body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, body, **kwargs): # noqa: E501 """create_resource_slice # noqa: E501 @@ -462,25 +566,34 @@ def create_resource_slice(self, body, **kwargs): # 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 V1beta2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta2ResourceSlice + :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 @@ -491,27 +604,42 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # 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 V1beta2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -528,7 +656,10 @@ def create_resource_slice_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' ] ) @@ -541,8 +672,7 @@ def create_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -550,16 +680,16 @@ def create_resource_slice_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 = {} @@ -574,6 +704,13 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # 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, @@ -582,13 +719,14 @@ def create_resource_slice_with_http_info(self, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, **kwargs): # noqa: E501 """delete_collection_device_class # noqa: E501 @@ -596,35 +734,54 @@ def delete_collection_device_class(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_device_class_with_http_info(**kwargs) # noqa: E501 @@ -635,37 +792,62 @@ def delete_collection_device_class_with_http_info(self, **kwargs): # 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 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -692,7 +874,10 @@ def delete_collection_device_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' ] ) @@ -710,36 +895,36 @@ def delete_collection_device_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 '_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -754,6 +939,11 @@ def delete_collection_device_class_with_http_info(self, **kwargs): # 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, @@ -762,13 +952,14 @@ def delete_collection_device_class_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_resource_claim(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_claim # noqa: E501 @@ -776,36 +967,56 @@ def delete_collection_namespaced_resource_claim(self, namespace, **kwargs): # n 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_claim_with_http_info(namespace, **kwargs) # noqa: E501 @@ -816,38 +1027,64 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -875,7 +1112,10 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -888,8 +1128,7 @@ def delete_collection_namespaced_resource_claim_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_claim`") # noqa: E501 collection_formats = {} @@ -899,36 +1138,36 @@ def delete_collection_namespaced_resource_claim_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -943,6 +1182,11 @@ def delete_collection_namespaced_resource_claim_with_http_info(self, namespace, # 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, @@ -951,13 +1195,14 @@ def delete_collection_namespaced_resource_claim_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_resource_claim_template(self, namespace, **kwargs): # noqa: E501 """delete_collection_namespaced_resource_claim_template # noqa: E501 @@ -965,36 +1210,56 @@ def delete_collection_namespaced_resource_claim_template(self, namespace, **kwar 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_claim_template_with_http_info(namespace, **kwargs) # noqa: E501 @@ -1005,38 +1270,64 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1064,7 +1355,10 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1077,8 +1371,7 @@ def delete_collection_namespaced_resource_claim_template_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_resource_claim_template`") # noqa: E501 collection_formats = {} @@ -1088,36 +1381,36 @@ def delete_collection_namespaced_resource_claim_template_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1132,6 +1425,11 @@ def delete_collection_namespaced_resource_claim_template_with_http_info(self, na # 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, @@ -1140,13 +1438,14 @@ def delete_collection_namespaced_resource_claim_template_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_resource_slice(self, **kwargs): # noqa: E501 """delete_collection_resource_slice # noqa: E501 @@ -1154,35 +1453,54 @@ def delete_collection_resource_slice(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_resource_slice_with_http_info(**kwargs) # noqa: E501 @@ -1193,37 +1511,62 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1250,7 +1593,10 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1268,36 +1614,36 @@ def delete_collection_resource_slice_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1312,6 +1658,11 @@ def delete_collection_resource_slice_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -1320,13 +1671,14 @@ def delete_collection_resource_slice_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_device_class(self, name, **kwargs): # noqa: E501 """delete_device_class # noqa: E501 @@ -1334,28 +1686,40 @@ def delete_device_class(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta2DeviceClass + :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 @@ -1366,30 +1730,48 @@ def delete_device_class_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1409,7 +1791,10 @@ def delete_device_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' ] ) @@ -1422,8 +1807,7 @@ def delete_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -1433,20 +1817,20 @@ def delete_device_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1461,6 +1845,12 @@ def delete_device_class_with_http_info(self, name, **kwargs): # 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, @@ -1469,13 +1859,14 @@ def delete_device_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_claim # noqa: E501 @@ -1483,29 +1874,42 @@ def delete_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta2ResourceClaim + :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 @@ -1516,31 +1920,50 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1561,7 +1984,10 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1574,12 +2000,10 @@ def delete_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -1591,20 +2015,20 @@ def delete_namespaced_resource_claim_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1619,6 +2043,12 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa # 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, @@ -1627,13 +2057,14 @@ def delete_namespaced_resource_claim_with_http_info(self, name, namespace, **kwa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_resource_claim_template # noqa: E501 @@ -1641,29 +2072,42 @@ def delete_namespaced_resource_claim_template(self, name, namespace, **kwargs): 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta2ResourceClaimTemplate + :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 @@ -1674,31 +2118,50 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1719,7 +2182,10 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1732,12 +2198,10 @@ def delete_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -1749,20 +2213,20 @@ def delete_namespaced_resource_claim_template_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1777,6 +2241,12 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa # 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, @@ -1785,13 +2255,14 @@ def delete_namespaced_resource_claim_template_with_http_info(self, name, namespa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, **kwargs): # noqa: E501 """delete_resource_slice # noqa: E501 @@ -1799,28 +2270,40 @@ def delete_resource_slice(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta2ResourceSlice + :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 @@ -1831,30 +2314,48 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1874,7 +2375,10 @@ def delete_resource_slice_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' ] ) @@ -1887,8 +2391,7 @@ def delete_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -1898,20 +2401,20 @@ def delete_resource_slice_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -1926,6 +2429,12 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # 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, @@ -1934,13 +2443,14 @@ def delete_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -1948,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 @@ -1972,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() @@ -1999,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' ] ) @@ -2018,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 = {} @@ -2031,6 +2558,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2039,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_device_class(self, **kwargs): # noqa: E501 """list_device_class # noqa: E501 @@ -2053,31 +2586,46 @@ def list_device_class(self, **kwargs): # 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 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: V1beta2DeviceClassList + :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 @@ -2088,33 +2636,54 @@ def list_device_class_with_http_info(self, **kwargs): # 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 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(V1beta2DeviceClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2137,7 +2706,10 @@ def list_device_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' ] ) @@ -2155,30 +2727,30 @@ def list_device_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 = {} @@ -2191,6 +2763,11 @@ def list_device_class_with_http_info(self, **kwargs): # 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, @@ -2199,13 +2776,14 @@ def list_device_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2DeviceClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_claim # noqa: E501 @@ -2213,32 +2791,48 @@ def list_namespaced_resource_claim(self, namespace, **kwargs): # 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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: V1beta2ResourceClaimList + :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 @@ -2249,34 +2843,56 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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(V1beta2ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2300,7 +2916,10 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2313,8 +2932,7 @@ def list_namespaced_resource_claim_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_claim`") # noqa: E501 collection_formats = {} @@ -2324,30 +2942,30 @@ def list_namespaced_resource_claim_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 = {} @@ -2360,6 +2978,11 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # # 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, @@ -2368,13 +2991,14 @@ def list_namespaced_resource_claim_with_http_info(self, namespace, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, namespace, **kwargs): # noqa: E501 """list_namespaced_resource_claim_template # noqa: E501 @@ -2382,32 +3006,48 @@ def list_namespaced_resource_claim_template(self, namespace, **kwargs): # noqa: 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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: V1beta2ResourceClaimTemplateList + :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 @@ -2418,34 +3058,56 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw 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 namespace: object name and auth scope, such as for teams and projects (required) + :type namespace: str + :param pretty: If 'true', then the output is 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(V1beta2ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2469,7 +3131,10 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2482,8 +3147,7 @@ def list_namespaced_resource_claim_template_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_resource_claim_template`") # noqa: E501 collection_formats = {} @@ -2493,30 +3157,30 @@ def list_namespaced_resource_claim_template_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 = {} @@ -2529,6 +3193,11 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw # 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, @@ -2537,13 +3206,14 @@ def list_namespaced_resource_claim_template_with_http_info(self, namespace, **kw body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_claim_for_all_namespaces # noqa: E501 @@ -2551,31 +3221,46 @@ def list_resource_claim_for_all_namespaces(self, **kwargs): # 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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: V1beta2ResourceClaimList + :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 @@ -2586,33 +3271,54 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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(V1beta2ResourceClaimList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2635,7 +3341,10 @@ def list_resource_claim_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' ] ) @@ -2653,30 +3362,30 @@ def list_resource_claim_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 = {} @@ -2689,6 +3398,11 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no # 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, @@ -2697,13 +3411,14 @@ def list_resource_claim_for_all_namespaces_with_http_info(self, **kwargs): # no body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template_for_all_namespaces(self, **kwargs): # noqa: E501 """list_resource_claim_template_for_all_namespaces # noqa: E501 @@ -2711,31 +3426,46 @@ def list_resource_claim_template_for_all_namespaces(self, **kwargs): # noqa: E5 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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: V1beta2ResourceClaimTemplateList + :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 @@ -2746,33 +3476,54 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg 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 allow_watch_bookmarks: allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, 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(V1beta2ResourceClaimTemplateList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2795,7 +3546,10 @@ def list_resource_claim_template_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' ] ) @@ -2813,30 +3567,30 @@ def list_resource_claim_template_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 = {} @@ -2849,6 +3603,11 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg # 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, @@ -2857,13 +3616,14 @@ def list_resource_claim_template_for_all_namespaces_with_http_info(self, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplateList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_slice(self, **kwargs): # noqa: E501 """list_resource_slice # noqa: E501 @@ -2871,31 +3631,46 @@ def list_resource_slice(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1beta2ResourceSliceList + :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 @@ -2906,33 +3681,54 @@ def list_resource_slice_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1beta2ResourceSliceList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2955,7 +3751,10 @@ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2973,30 +3772,30 @@ def list_resource_slice_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 = {} @@ -3009,6 +3808,11 @@ def list_resource_slice_with_http_info(self, **kwargs): # 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, @@ -3017,13 +3821,14 @@ def list_resource_slice_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceSliceList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, body, **kwargs): # noqa: E501 """patch_device_class # noqa: E501 @@ -3031,27 +3836,38 @@ def patch_device_class(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (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 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: V1beta2DeviceClass + :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 @@ -3062,29 +3878,46 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (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 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. - :return: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3103,7 +3936,10 @@ def patch_device_class_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' ] ) @@ -3116,12 +3952,10 @@ def patch_device_class_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_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -3131,18 +3965,18 @@ def patch_device_class_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 = {} @@ -3155,12 +3989,22 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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: "V1beta2DeviceClass", + 201: "V1beta2DeviceClass", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta2/deviceclasses/{name}', 'PATCH', path_params, @@ -3169,13 +4013,14 @@ def patch_device_class_with_http_info(self, name, body, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim # noqa: E501 @@ -3183,28 +4028,40 @@ def patch_namespaced_resource_claim(self, name, namespace, body, **kwargs): # n 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 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: V1beta2ResourceClaim + :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 @@ -3215,30 +4072,48 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, 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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3258,7 +4133,10 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3271,16 +4149,13 @@ def patch_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -3292,18 +4167,18 @@ def patch_namespaced_resource_claim_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 = {} @@ -3316,12 +4191,22 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, ['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', 'application/apply-patch+cbor']) # 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: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}', 'PATCH', path_params, @@ -3330,13 +4215,14 @@ def patch_namespaced_resource_claim_with_http_info(self, name, namespace, body, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim_status # noqa: E501 @@ -3344,28 +4230,40 @@ def patch_namespaced_resource_claim_status(self, name, namespace, body, **kwargs 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 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: V1beta2ResourceClaim + :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 @@ -3376,30 +4274,48 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, 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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3419,7 +4335,10 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3432,16 +4351,13 @@ def patch_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -3453,18 +4369,18 @@ def patch_namespaced_resource_claim_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 = {} @@ -3477,12 +4393,22 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, ['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', 'application/apply-patch+cbor']) # 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: "V1beta2ResourceClaim", + 201: "V1beta2ResourceClaim", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status', 'PATCH', path_params, @@ -3491,13 +4417,14 @@ def patch_namespaced_resource_claim_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 """patch_namespaced_resource_claim_template # noqa: E501 @@ -3505,28 +4432,40 @@ def patch_namespaced_resource_claim_template(self, name, namespace, body, **kwar 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 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: V1beta2ResourceClaimTemplate + :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 @@ -3537,30 +4476,48 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac 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 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. - :return: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3580,7 +4537,10 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -3593,16 +4553,13 @@ def patch_namespaced_resource_claim_template_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_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 + if self.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 ('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_claim_template`") # noqa: E501 collection_formats = {} @@ -3614,18 +4571,18 @@ def patch_namespaced_resource_claim_template_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 = {} @@ -3638,12 +4595,22 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac ['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', 'application/apply-patch+cbor']) # 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: "V1beta2ResourceClaimTemplate", + 201: "V1beta2ResourceClaimTemplate", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}', 'PATCH', path_params, @@ -3652,13 +4619,14 @@ def patch_namespaced_resource_claim_template_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, body, **kwargs): # noqa: E501 """patch_resource_slice # noqa: E501 @@ -3666,27 +4634,38 @@ def patch_resource_slice(self, name, body, **kwargs): # 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 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: V1beta2ResourceSlice + :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 @@ -3697,29 +4676,46 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 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 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. - :return: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3738,7 +4734,10 @@ def patch_resource_slice_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' ] ) @@ -3751,12 +4750,10 @@ def patch_resource_slice_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_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 + if self.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 = {} @@ -3766,18 +4763,18 @@ def patch_resource_slice_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 = {} @@ -3790,12 +4787,22 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 ['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', 'application/apply-patch+cbor']) # 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: "V1beta2ResourceSlice", + 201: "V1beta2ResourceSlice", + 401: None, + } + return self.api_client.call_api( '/apis/resource.k8s.io/v1beta2/resourceslices/{name}', 'PATCH', path_params, @@ -3804,13 +4811,14 @@ def patch_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, **kwargs): # noqa: E501 """read_device_class # noqa: E501 @@ -3818,22 +4826,28 @@ def read_device_class(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then 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 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: V1beta2DeviceClass + :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 @@ -3844,24 +4858,36 @@ def read_device_class_with_http_info(self, name, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param str pretty: If 'true', then 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 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. - :return: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3875,7 +4901,10 @@ def read_device_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' ] ) @@ -3888,8 +4917,7 @@ def read_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -3899,10 +4927,10 @@ def read_device_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 = {} @@ -3915,6 +4943,11 @@ def read_device_class_with_http_info(self, name, **kwargs): # 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, @@ -3923,13 +4956,14 @@ def read_device_class_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim # noqa: E501 @@ -3937,23 +4971,30 @@ def read_namespaced_resource_claim(self, name, namespace, **kwargs): # noqa: E5 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 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: V1beta2ResourceClaim + :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 @@ -3964,25 +5005,38 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg 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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -3997,7 +5051,10 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4010,12 +5067,10 @@ def read_namespaced_resource_claim_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_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_resource_claim`") # noqa: E501 collection_formats = {} @@ -4027,10 +5082,10 @@ def read_namespaced_resource_claim_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 = {} @@ -4043,6 +5098,11 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg # 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, @@ -4051,13 +5111,14 @@ def read_namespaced_resource_claim_with_http_info(self, name, namespace, **kwarg body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim_status # noqa: E501 @@ -4065,23 +5126,30 @@ def read_namespaced_resource_claim_status(self, name, namespace, **kwargs): # n 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 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: V1beta2ResourceClaim + :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 @@ -4092,25 +5160,38 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, 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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4125,7 +5206,10 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4138,12 +5222,10 @@ def read_namespaced_resource_claim_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_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_resource_claim_status`") # noqa: E501 collection_formats = {} @@ -4155,10 +5237,10 @@ def read_namespaced_resource_claim_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 = {} @@ -4171,6 +5253,11 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, # 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, @@ -4179,13 +5266,14 @@ def read_namespaced_resource_claim_status_with_http_info(self, name, namespace, body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_resource_claim_template # noqa: E501 @@ -4193,23 +5281,30 @@ def read_namespaced_resource_claim_template(self, name, namespace, **kwargs): # 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 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: V1beta2ResourceClaimTemplate + :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 @@ -4220,25 +5315,38 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace 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 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. - :return: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4253,7 +5361,10 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4266,12 +5377,10 @@ def read_namespaced_resource_claim_template_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_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 + if self.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 = {} @@ -4283,10 +5392,10 @@ def read_namespaced_resource_claim_template_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 = {} @@ -4299,6 +5408,11 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace # 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, @@ -4307,13 +5421,14 @@ def read_namespaced_resource_claim_template_with_http_info(self, name, namespace body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, **kwargs): # noqa: E501 """read_resource_slice # noqa: E501 @@ -4321,22 +5436,28 @@ def read_resource_slice(self, name, **kwargs): # 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 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: V1beta2ResourceSlice + :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 @@ -4347,24 +5468,36 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # 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 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. - :return: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4378,7 +5511,10 @@ def read_resource_slice_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' ] ) @@ -4391,8 +5527,7 @@ def read_resource_slice_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_resource_slice`") # noqa: E501 collection_formats = {} @@ -4402,10 +5537,10 @@ def read_resource_slice_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 = {} @@ -4418,6 +5553,11 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # 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, @@ -4426,13 +5566,14 @@ def read_resource_slice_with_http_info(self, name, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_device_class(self, name, body, **kwargs): # noqa: E501 """replace_device_class # noqa: E501 @@ -4440,26 +5581,36 @@ def replace_device_class(self, name, body, **kwargs): # 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param V1beta2DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta2DeviceClass + :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 @@ -4470,28 +5621,44 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 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 async_req bool: execute request asynchronously - :param str name: name of the DeviceClass (required) - :param V1beta2DeviceClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta2DeviceClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4509,7 +5676,10 @@ def replace_device_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' ] ) @@ -4522,12 +5692,10 @@ def replace_device_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 `replace_device_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_device_class`") # noqa: E501 collection_formats = {} @@ -4537,16 +5705,16 @@ def replace_device_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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -4561,6 +5729,12 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 # 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, @@ -4569,13 +5743,14 @@ def replace_device_class_with_http_info(self, name, body, **kwargs): # noqa: E5 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2DeviceClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim # noqa: E501 @@ -4583,27 +5758,38 @@ def replace_namespaced_resource_claim(self, name, namespace, body, **kwargs): # 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 V1beta2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta2ResourceClaim + :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 @@ -4614,29 +5800,46 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body 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 V1beta2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4655,7 +5858,10 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4668,16 +5874,13 @@ def replace_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -4689,16 +5892,16 @@ def replace_namespaced_resource_claim_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 = {} @@ -4713,6 +5916,12 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body # 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, @@ -4721,13 +5930,14 @@ def replace_namespaced_resource_claim_with_http_info(self, name, namespace, body body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_status(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim_status # noqa: E501 @@ -4735,27 +5945,38 @@ def replace_namespaced_resource_claim_status(self, name, namespace, body, **kwar 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 V1beta2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta2ResourceClaim + :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 @@ -4766,29 +5987,46 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac 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 V1beta2ResourceClaim body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta2ResourceClaim, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4807,7 +6045,10 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4820,16 +6061,13 @@ def replace_namespaced_resource_claim_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_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_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 + if self.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 = {} @@ -4841,16 +6079,16 @@ def replace_namespaced_resource_claim_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 = {} @@ -4865,6 +6103,12 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac # 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, @@ -4873,13 +6117,14 @@ def replace_namespaced_resource_claim_status_with_http_info(self, name, namespac body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaim', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_claim_template(self, name, namespace, body, **kwargs): # noqa: E501 """replace_namespaced_resource_claim_template # noqa: E501 @@ -4887,27 +6132,38 @@ def replace_namespaced_resource_claim_template(self, name, namespace, body, **kw 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 V1beta2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta2ResourceClaimTemplate + :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 @@ -4918,29 +6174,46 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp 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 V1beta2ResourceClaimTemplate body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta2ResourceClaimTemplate, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4959,7 +6232,10 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -4972,16 +6248,13 @@ def replace_namespaced_resource_claim_template_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_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 + if self.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 ('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_claim_template`") # noqa: E501 collection_formats = {} @@ -4993,16 +6266,16 @@ def replace_namespaced_resource_claim_template_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 = {} @@ -5017,6 +6290,12 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp # 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, @@ -5025,13 +6304,14 @@ def replace_namespaced_resource_claim_template_with_http_info(self, name, namesp body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceClaimTemplate', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_resource_slice(self, name, body, **kwargs): # noqa: E501 """replace_resource_slice # noqa: E501 @@ -5039,26 +6319,36 @@ def replace_resource_slice(self, name, body, **kwargs): # 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 V1beta2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta2ResourceSlice + :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 @@ -5069,28 +6359,44 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: 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 V1beta2ResourceSlice body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta2ResourceSlice, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5108,7 +6414,10 @@ def replace_resource_slice_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' ] ) @@ -5121,12 +6430,10 @@ def replace_resource_slice_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_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 + if self.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 = {} @@ -5136,16 +6443,16 @@ def replace_resource_slice_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 = {} @@ -5160,6 +6467,12 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: # 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, @@ -5168,10 +6481,11 @@ def replace_resource_slice_with_http_info(self, name, body, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta2ResourceSlice', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_api.py b/kubernetes/client/api/scheduling_api.py index 1faa1bf52c..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.34 + 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 2bba536580..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_priority_class_with_http_info(self, body, **kwargs): # 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,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -215,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -272,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' ] ) @@ -290,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -334,6 +415,11 @@ def delete_collection_priority_class_with_http_info(self, **kwargs): # noqa: E5 # 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, @@ -342,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 @@ -356,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -388,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -431,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' ] ) @@ -444,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 = {} @@ -455,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -483,6 +602,12 @@ def delete_priority_class_with_http_info(self, name, **kwargs): # 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, @@ -491,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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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 @@ -610,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 @@ -645,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() @@ -694,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' ] ) @@ -712,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 = {} @@ -748,6 +936,11 @@ def list_priority_class_with_http_info(self, **kwargs): # 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, @@ -756,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 @@ -770,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 @@ -801,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() @@ -842,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' ] ) @@ -855,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 = {} @@ -870,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 = {} @@ -894,12 +1117,22 @@ def patch_priority_class_with_http_info(self, name, body, **kwargs): # noqa: E5 ['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', 'application/apply-patch+cbor']) # 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, @@ -908,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 @@ -922,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 @@ -948,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() @@ -979,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' ] ) @@ -992,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 = {} @@ -1003,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 = {} @@ -1019,6 +1273,11 @@ def read_priority_class_with_http_info(self, name, **kwargs): # 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, @@ -1027,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 @@ -1041,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 @@ -1071,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() @@ -1110,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' ] ) @@ -1123,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 = {} @@ -1138,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 = {} @@ -1162,6 +1449,12 @@ def replace_priority_class_with_http_info(self, name, body, **kwargs): # noqa: # 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, @@ -1170,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 e11a398069..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.34 + 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 1583b1632f..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.34 + 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 = {} @@ -154,6 +180,13 @@ def create_csi_driver_with_http_info(self, body, **kwargs): # 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 = {} @@ -288,6 +348,13 @@ def create_csi_node_with_http_info(self, body, **kwargs): # 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 = {} @@ -431,6 +526,13 @@ def create_namespaced_csi_storage_capacity_with_http_info(self, namespace, body, # 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 = {} @@ -565,6 +694,13 @@ def create_storage_class_with_http_info(self, body, **kwargs): # 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 = {} @@ -699,6 +862,13 @@ def create_volume_attachment_with_http_info(self, body, **kwargs): # 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,14 @@ 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) + 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 @@ -721,25 +892,34 @@ def create_volume_attributes_class(self, body, **kwargs): # 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 V1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1VolumeAttributesClass + :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 @@ -750,27 +930,42 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa 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 V1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -787,7 +982,10 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -800,8 +998,7 @@ def create_volume_attributes_class_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_volume_attributes_class`") # noqa: E501 collection_formats = {} @@ -809,16 +1006,16 @@ def create_volume_attributes_class_with_http_info(self, body, **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 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if 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 = {} @@ -833,6 +1030,13 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa # 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, @@ -841,13 +1045,14 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -855,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -894,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -951,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' ] ) @@ -969,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1013,6 +1265,11 @@ def delete_collection_csi_driver_with_http_info(self, **kwargs): # 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, @@ -1021,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 @@ -1035,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1074,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1131,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' ] ) @@ -1149,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1193,6 +1498,11 @@ def delete_collection_csi_node_with_http_info(self, **kwargs): # 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, @@ -1201,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 @@ -1215,36 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1255,38 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1314,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' ] ) @@ -1327,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 = {} @@ -1338,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1382,6 +1741,11 @@ def delete_collection_namespaced_csi_storage_capacity_with_http_info(self, names # 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, @@ -1390,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 @@ -1404,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1443,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1500,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' ] ) @@ -1518,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1562,6 +1974,11 @@ def delete_collection_storage_class_with_http_info(self, **kwargs): # noqa: E50 # 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, @@ -1570,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 @@ -1584,35 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 @@ -1623,37 +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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1680,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' ] ) @@ -1698,36 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1742,6 +2207,11 @@ def delete_collection_volume_attachment_with_http_info(self, **kwargs): # noqa: # 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, @@ -1750,13 +2220,14 @@ 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_collection_volume_attributes_class(self, **kwargs): # noqa: E501 """delete_collection_volume_attributes_class # noqa: E501 @@ -1764,35 +2235,54 @@ def delete_collection_volume_attributes_class(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_attributes_class_with_http_info(**kwargs) # noqa: E501 @@ -1803,37 +2293,62 @@ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -1860,7 +2375,10 @@ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1878,36 +2396,36 @@ def delete_collection_volume_attributes_class_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -1922,6 +2440,11 @@ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # # 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/volumeattributesclasses', 'DELETE', path_params, @@ -1930,13 +2453,14 @@ def delete_collection_volume_attributes_class_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_csi_driver(self, name, **kwargs): # noqa: E501 """delete_csi_driver # noqa: E501 @@ -1944,28 +2468,40 @@ def delete_csi_driver(self, name, **kwargs): # 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_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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: 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.delete_csi_driver_with_http_info(name, **kwargs) # noqa: E501 @@ -1976,30 +2512,48 @@ def delete_csi_driver_with_http_info(self, name, **kwargs): # 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_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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(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() @@ -2019,7 +2573,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' ] ) @@ -2032,8 +2589,7 @@ def delete_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 `delete_csi_driver`") # noqa: E501 collection_formats = {} @@ -2043,20 +2599,20 @@ def delete_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2071,6 +2627,12 @@ def delete_csi_driver_with_http_info(self, name, **kwargs): # 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/csidrivers/{name}', 'DELETE', path_params, @@ -2079,13 +2641,14 @@ def delete_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 delete_csi_node(self, name, **kwargs): # noqa: E501 """delete_csi_node # noqa: E501 @@ -2093,28 +2656,40 @@ def delete_csi_node(self, name, **kwargs): # 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_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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: 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.delete_csi_node_with_http_info(name, **kwargs) # noqa: E501 @@ -2125,30 +2700,48 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # 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_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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(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() @@ -2168,7 +2761,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' ] ) @@ -2181,8 +2777,7 @@ def delete_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 `delete_csi_node`") # noqa: E501 collection_formats = {} @@ -2192,20 +2787,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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2220,6 +2815,12 @@ def delete_csi_node_with_http_info(self, name, **kwargs): # 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/csinodes/{name}', 'DELETE', path_params, @@ -2228,13 +2829,14 @@ def delete_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 delete_namespaced_csi_storage_capacity(self, name, namespace, **kwargs): # noqa: E501 """delete_namespaced_csi_storage_capacity # noqa: E501 @@ -2242,29 +2844,42 @@ def delete_namespaced_csi_storage_capacity(self, name, namespace, **kwargs): # 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_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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: 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_csi_storage_capacity_with_http_info(name, namespace, **kwargs) # noqa: E501 @@ -2275,31 +2890,50 @@ def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, 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_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 str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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(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() @@ -2320,7 +2954,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' ] ) @@ -2333,12 +2970,10 @@ def delete_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 `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 + if self.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 = {} @@ -2350,20 +2985,20 @@ def delete_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 '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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2378,6 +3013,12 @@ def delete_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, # 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/namespaces/{namespace}/csistoragecapacities/{name}', 'DELETE', path_params, @@ -2386,13 +3027,14 @@ def delete_namespaced_csi_storage_capacity_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_storage_class(self, name, **kwargs): # noqa: E501 """delete_storage_class # noqa: E501 @@ -2400,28 +3042,40 @@ def delete_storage_class(self, name, **kwargs): # 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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: 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.delete_storage_class_with_http_info(name, **kwargs) # noqa: E501 @@ -2432,30 +3086,48 @@ def delete_storage_class_with_http_info(self, name, **kwargs): # 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 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :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() @@ -2475,7 +3147,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' ] ) @@ -2488,8 +3163,7 @@ def delete_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 `delete_storage_class`") # noqa: E501 collection_formats = {} @@ -2499,20 +3173,20 @@ def delete_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2527,6 +3201,12 @@ def delete_storage_class_with_http_info(self, name, **kwargs): # 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, @@ -2535,13 +3215,14 @@ def delete_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 delete_volume_attachment(self, name, **kwargs): # noqa: E501 """delete_volume_attachment # noqa: E501 @@ -2549,28 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 @@ -2581,30 +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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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() @@ -2624,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' ] ) @@ -2637,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 = {} @@ -2648,20 +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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2676,6 +3389,12 @@ def delete_volume_attachment_with_http_info(self, name, **kwargs): # 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, @@ -2684,13 +3403,14 @@ 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 @@ -2698,28 +3418,40 @@ def delete_volume_attributes_class(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1VolumeAttributesClass + :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 @@ -2730,30 +3462,48 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -2773,7 +3523,10 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -2786,8 +3539,7 @@ def delete_volume_attributes_class_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 `delete_volume_attributes_class`") # noqa: E501 collection_formats = {} @@ -2797,20 +3549,20 @@ def delete_volume_attributes_class_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -2825,6 +3577,12 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa # 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, @@ -2833,13 +3591,14 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -2847,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 @@ -2871,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() @@ -2898,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' ] ) @@ -2917,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 = {} @@ -2930,6 +3706,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -2938,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 @@ -2952,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 @@ -2987,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() @@ -3036,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' ] ) @@ -3054,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 = {} @@ -3090,6 +3911,11 @@ def list_csi_driver_with_http_info(self, **kwargs): # 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, @@ -3098,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 @@ -3112,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 @@ -3147,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() @@ -3196,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' ] ) @@ -3214,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 = {} @@ -3250,6 +4116,11 @@ def list_csi_node_with_http_info(self, **kwargs): # 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, @@ -3258,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 @@ -3272,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 @@ -3307,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() @@ -3356,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' ] ) @@ -3374,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 = {} @@ -3410,6 +4321,11 @@ def list_csi_storage_capacity_for_all_namespaces_with_http_info(self, **kwargs): # 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, @@ -3418,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 @@ -3432,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 @@ -3468,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() @@ -3519,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' ] ) @@ -3532,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 = {} @@ -3543,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 = {} @@ -3579,6 +4536,11 @@ def list_namespaced_csi_storage_capacity_with_http_info(self, namespace, **kwarg # 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, @@ -3587,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 @@ -3601,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 @@ -3636,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() @@ -3685,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' ] ) @@ -3703,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 = {} @@ -3739,6 +4741,11 @@ def list_storage_class_with_http_info(self, **kwargs): # 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, @@ -3747,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 @@ -3761,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 @@ -3796,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() @@ -3845,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' ] ) @@ -3863,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 = {} @@ -3899,6 +4946,11 @@ def list_volume_attachment_with_http_info(self, **kwargs): # 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, @@ -3907,13 +4959,14 @@ 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 @@ -3921,31 +4974,46 @@ def list_volume_attributes_class(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1VolumeAttributesClassList + :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 @@ -3956,33 +5024,54 @@ def list_volume_attributes_class_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1VolumeAttributesClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -4005,7 +5094,10 @@ def list_volume_attributes_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' ] ) @@ -4023,30 +5115,30 @@ def list_volume_attributes_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 = {} @@ -4059,6 +5151,11 @@ def list_volume_attributes_class_with_http_info(self, **kwargs): # 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, @@ -4067,13 +5164,14 @@ def list_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttributesClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_driver(self, name, body, **kwargs): # noqa: E501 """patch_csi_driver # noqa: E501 @@ -4081,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 @@ -4112,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() @@ -4153,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' ] ) @@ -4166,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 = {} @@ -4181,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 = {} @@ -4205,12 +5332,22 @@ def patch_csi_driver_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -4219,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 @@ -4233,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 @@ -4264,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() @@ -4305,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' ] ) @@ -4318,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 = {} @@ -4333,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 = {} @@ -4357,12 +5524,22 @@ def patch_csi_node_with_http_info(self, name, body, **kwargs): # 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', 'application/apply-patch+cbor']) # 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, @@ -4371,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 @@ -4385,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 @@ -4417,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() @@ -4460,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' ] ) @@ -4473,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 = {} @@ -4494,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 = {} @@ -4518,12 +5726,22 @@ def patch_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, ['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', 'application/apply-patch+cbor']) # 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, @@ -4532,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 @@ -4546,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 @@ -4577,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() @@ -4618,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' ] ) @@ -4631,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 = {} @@ -4646,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 = {} @@ -4670,12 +5918,22 @@ def patch_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E50 ['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', 'application/apply-patch+cbor']) # 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, @@ -4684,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 @@ -4698,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 @@ -4729,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() @@ -4770,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' ] ) @@ -4783,12 +6073,10 @@ 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 + if self.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 = {} @@ -4798,18 +6086,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 = {} @@ -4822,12 +6110,22 @@ def patch_volume_attachment_with_http_info(self, name, body, **kwargs): # noqa: ['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', 'application/apply-patch+cbor']) # 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', path_params, @@ -4836,13 +6134,14 @@ def patch_volume_attachment_with_http_info(self, name, body, **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) + 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 @@ -4850,27 +6149,38 @@ def patch_volume_attachment_status(self, name, body, **kwargs): # 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 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_status_with_http_info(name, body, **kwargs) # noqa: E501 @@ -4881,29 +6191,46 @@ def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): 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 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() @@ -4922,7 +6249,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' ] ) @@ -4935,12 +6265,10 @@ def patch_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 `patch_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 `patch_volume_attachment_status`") # noqa: E501 collection_formats = {} @@ -4950,18 +6278,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 = {} @@ -4974,12 +6302,22 @@ def patch_volume_attachment_status_with_http_info(self, name, body, **kwargs): ['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', 'application/apply-patch+cbor']) # 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}/status', 'PATCH', path_params, @@ -4988,13 +6326,14 @@ def patch_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) + 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 @@ -5002,27 +6341,38 @@ def patch_volume_attributes_class(self, name, body, **kwargs): # 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 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: V1VolumeAttributesClass + :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_attributes_class_with_http_info(name, body, **kwargs) # noqa: E501 @@ -5033,29 +6383,46 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # 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 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(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5074,7 +6441,10 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5087,12 +6457,10 @@ def patch_volume_attributes_class_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_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 + if self.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 = {} @@ -5102,18 +6470,18 @@ def patch_volume_attributes_class_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 = {} @@ -5126,12 +6494,22 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # ['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', 'application/apply-patch+cbor']) # 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/volumeattributesclasses/{name}', 'PATCH', path_params, @@ -5140,13 +6518,14 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -5154,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 @@ -5180,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() @@ -5211,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' ] ) @@ -5224,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 = {} @@ -5235,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 = {} @@ -5251,6 +6650,11 @@ def read_csi_driver_with_http_info(self, name, **kwargs): # 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, @@ -5259,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 @@ -5273,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 @@ -5299,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() @@ -5330,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' ] ) @@ -5343,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 = {} @@ -5354,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 = {} @@ -5370,6 +6795,11 @@ def read_csi_node_with_http_info(self, name, **kwargs): # 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, @@ -5378,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 @@ -5392,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 @@ -5419,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() @@ -5452,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' ] ) @@ -5465,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 = {} @@ -5482,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 = {} @@ -5498,6 +6950,11 @@ def read_namespaced_csi_storage_capacity_with_http_info(self, name, namespace, * # 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, @@ -5506,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 @@ -5520,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 @@ -5546,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() @@ -5577,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' ] ) @@ -5590,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 = {} @@ -5601,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 = {} @@ -5617,6 +7095,11 @@ def read_storage_class_with_http_info(self, name, **kwargs): # 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, @@ -5625,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 @@ -5639,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 @@ -5665,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() @@ -5696,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' ] ) @@ -5709,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 = {} @@ -5720,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 = {} @@ -5736,6 +7240,11 @@ def read_volume_attachment_with_http_info(self, name, **kwargs): # 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, @@ -5744,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 @@ -5758,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 @@ -5784,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() @@ -5815,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' ] ) @@ -5828,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 = {} @@ -5839,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 = {} @@ -5855,6 +7385,11 @@ def read_volume_attachment_status_with_http_info(self, name, **kwargs): # noqa: # 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, @@ -5863,13 +7398,14 @@ 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) + 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 @@ -5877,22 +7413,28 @@ def read_volume_attributes_class(self, name, **kwargs): # 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 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: V1VolumeAttributesClass + :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 @@ -5903,24 +7445,36 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: 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 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. - :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -5934,7 +7488,10 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -5947,8 +7504,7 @@ def read_volume_attributes_class_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_attributes_class`") # noqa: E501 collection_formats = {} @@ -5958,10 +7514,10 @@ def read_volume_attributes_class_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 = {} @@ -5974,6 +7530,11 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: # 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, @@ -5982,13 +7543,14 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -5996,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 @@ -6026,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() @@ -6065,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' ] ) @@ -6078,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 = {} @@ -6093,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 = {} @@ -6117,6 +7706,12 @@ def replace_csi_driver_with_http_info(self, name, body, **kwargs): # 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, @@ -6125,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 @@ -6139,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 @@ -6169,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() @@ -6208,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' ] ) @@ -6221,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 = {} @@ -6236,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 = {} @@ -6260,6 +7883,12 @@ def replace_csi_node_with_http_info(self, name, body, **kwargs): # 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, @@ -6268,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 @@ -6282,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 @@ -6313,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() @@ -6354,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' ] ) @@ -6367,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 = {} @@ -6388,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 = {} @@ -6412,6 +8070,12 @@ def replace_namespaced_csi_storage_capacity_with_http_info(self, name, namespace # 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, @@ -6420,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 @@ -6434,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 @@ -6464,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() @@ -6503,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' ] ) @@ -6516,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 = {} @@ -6531,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 = {} @@ -6555,6 +8247,12 @@ def replace_storage_class_with_http_info(self, name, body, **kwargs): # noqa: E # 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, @@ -6563,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 @@ -6577,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 @@ -6607,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() @@ -6646,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' ] ) @@ -6659,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 = {} @@ -6674,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 = {} @@ -6698,6 +8424,12 @@ def replace_volume_attachment_with_http_info(self, name, body, **kwargs): # noq # 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, @@ -6706,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 @@ -6720,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 @@ -6750,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() @@ -6789,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' ] ) @@ -6802,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 = {} @@ -6817,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 = {} @@ -6841,6 +8601,12 @@ def replace_volume_attachment_status_with_http_info(self, name, body, **kwargs): # 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, @@ -6849,13 +8615,14 @@ 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) + 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 @@ -6863,26 +8630,36 @@ def replace_volume_attributes_class(self, name, body, **kwargs): # 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 V1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1VolumeAttributesClass + :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 @@ -6893,28 +8670,44 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): 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 V1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -6932,7 +8725,10 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -6945,12 +8741,10 @@ def replace_volume_attributes_class_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_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 + if self.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 = {} @@ -6960,16 +8754,16 @@ def replace_volume_attributes_class_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 = {} @@ -6984,6 +8778,12 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): # 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, @@ -6992,10 +8792,11 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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 4d4ecdd57f..0000000000 --- a/kubernetes/client/api/storage_v1alpha1_api.py +++ /dev/null @@ -1,1179 +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.34 - 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', 'application/cbor']) # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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', - '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' - ] - ) - - for key, 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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', - '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' - ] - ) - - for key, 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # 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', 'application/cbor']) # 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/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/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', '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', 'application/apply-patch+cbor']) # 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', 'application/cbor']) # 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', 'application/cbor']) # 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 index aff2c50d41..cdb8197d4b 100644 --- a/kubernetes/client/api/storage_v1beta1_api.py +++ b/kubernetes/client/api/storage_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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,25 +42,34 @@ def create_volume_attributes_class(self, body, **kwargs): # 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 V1beta1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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: V1beta1VolumeAttributesClass + :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 @@ -71,27 +80,42 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa 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 V1beta1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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: 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. - :return: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -108,7 +132,10 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -121,8 +148,7 @@ def create_volume_attributes_class_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_volume_attributes_class`") # noqa: E501 collection_formats = {} @@ -130,16 +156,16 @@ def create_volume_attributes_class_with_http_info(self, body, **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 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + if 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 = {} @@ -154,6 +180,13 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa # 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, @@ -162,13 +195,14 @@ def create_volume_attributes_class_with_http_info(self, body, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_attributes_class(self, **kwargs): # noqa: E501 """delete_collection_volume_attributes_class # noqa: E501 @@ -176,35 +210,54 @@ def delete_collection_volume_attributes_class(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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_attributes_class_with_http_info(**kwargs) # noqa: E501 @@ -215,37 +268,62 @@ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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() @@ -272,7 +350,10 @@ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -290,36 +371,36 @@ def delete_collection_volume_attributes_class_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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 '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 = {} @@ -334,6 +415,11 @@ def delete_collection_volume_attributes_class_with_http_info(self, **kwargs): # # 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, @@ -342,13 +428,14 @@ def delete_collection_volume_attributes_class_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_volume_attributes_class(self, name, **kwargs): # noqa: E501 """delete_volume_attributes_class # noqa: E501 @@ -356,28 +443,40 @@ def delete_volume_attributes_class(self, name, **kwargs): # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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: V1beta1VolumeAttributesClass + :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 @@ -388,30 +487,48 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 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. - :return: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -431,7 +548,10 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -444,8 +564,7 @@ def delete_volume_attributes_class_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 `delete_volume_attributes_class`") # noqa: E501 collection_formats = {} @@ -455,20 +574,20 @@ def delete_volume_attributes_class_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 - if 'dry_run' in local_var_params and local_var_params['dry_run'] is not None: # noqa: E501 + 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['ignore_store_read_error_with_cluster_breaking_potential'] 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 '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 - header_params = {} + header_params = dict(local_var_params.get('_headers', {})) form_params = [] local_var_files = {} @@ -483,6 +602,12 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa # 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, @@ -491,13 +616,14 @@ def delete_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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 @@ -505,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 @@ -529,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() @@ -556,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' ] ) @@ -575,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 = {} @@ -588,6 +731,11 @@ def get_api_resources_with_http_info(self, **kwargs): # 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, @@ -596,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_volume_attributes_class(self, **kwargs): # noqa: E501 """list_volume_attributes_class # noqa: E501 @@ -610,31 +759,46 @@ def list_volume_attributes_class(self, **kwargs): # 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 pretty: If 'true', then the output is 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: V1beta1VolumeAttributesClassList + :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 @@ -645,33 +809,54 @@ def list_volume_attributes_class_with_http_info(self, **kwargs): # 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 pretty: If 'true', then the output is 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(V1beta1VolumeAttributesClassList, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -694,7 +879,10 @@ def list_volume_attributes_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' ] ) @@ -712,30 +900,30 @@ def list_volume_attributes_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 = {} @@ -748,6 +936,11 @@ def list_volume_attributes_class_with_http_info(self, **kwargs): # 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, @@ -756,13 +949,14 @@ def list_volume_attributes_class_with_http_info(self, **kwargs): # noqa: E501 body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1VolumeAttributesClassList', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_attributes_class(self, name, body, **kwargs): # noqa: E501 """patch_volume_attributes_class # noqa: E501 @@ -770,27 +964,38 @@ def patch_volume_attributes_class(self, name, body, **kwargs): # 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 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: V1beta1VolumeAttributesClass + :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 @@ -801,29 +1006,46 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # 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 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(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -842,7 +1064,10 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -855,12 +1080,10 @@ def patch_volume_attributes_class_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_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 + if self.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 = {} @@ -870,18 +1093,18 @@ def patch_volume_attributes_class_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 = {} @@ -894,12 +1117,22 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # ['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', 'application/apply-patch+cbor']) # 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: "V1beta1VolumeAttributesClass", + 201: "V1beta1VolumeAttributesClass", + 401: None, + } + return self.api_client.call_api( '/apis/storage.k8s.io/v1beta1/volumeattributesclasses/{name}', 'PATCH', path_params, @@ -908,13 +1141,14 @@ def patch_volume_attributes_class_with_http_info(self, name, body, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_attributes_class(self, name, **kwargs): # noqa: E501 """read_volume_attributes_class # noqa: E501 @@ -922,22 +1156,28 @@ def read_volume_attributes_class(self, name, **kwargs): # 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 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: V1beta1VolumeAttributesClass + :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 @@ -948,24 +1188,36 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: 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 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. - :return: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -979,7 +1231,10 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -992,8 +1247,7 @@ def read_volume_attributes_class_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_attributes_class`") # noqa: E501 collection_formats = {} @@ -1003,10 +1257,10 @@ def read_volume_attributes_class_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 = {} @@ -1019,6 +1273,11 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: # 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, @@ -1027,13 +1286,14 @@ def read_volume_attributes_class_with_http_info(self, name, **kwargs): # noqa: body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_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_attributes_class(self, name, body, **kwargs): # noqa: E501 """replace_volume_attributes_class # noqa: E501 @@ -1041,26 +1301,36 @@ def replace_volume_attributes_class(self, name, body, **kwargs): # 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 V1beta1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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: V1beta1VolumeAttributesClass + :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 @@ -1071,28 +1341,44 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): 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 V1beta1VolumeAttributesClass body: (required) - :param str pretty: If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). - :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed - :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. - :param str field_validation: fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from 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 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. - :return: tuple(V1beta1VolumeAttributesClass, status_code(int), headers(HTTPHeaderDict)) + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, 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() @@ -1110,7 +1396,10 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): 'async_req', '_return_http_data_only', '_preload_content', - '_request_timeout' + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' ] ) @@ -1123,12 +1412,10 @@ def replace_volume_attributes_class_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_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 + if self.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 = {} @@ -1138,16 +1425,16 @@ def replace_volume_attributes_class_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 = {} @@ -1162,6 +1449,12 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): # 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, @@ -1170,10 +1463,11 @@ def replace_volume_attributes_class_with_http_info(self, name, body, **kwargs): body=body_params, post_params=form_params, files=local_var_files, - response_type='V1beta1VolumeAttributesClass', # noqa: E501 + response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _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_api.py b/kubernetes/client/api/storagemigration_api.py index b911ee86c4..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.34 + 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 0103fd55dc..0000000000 --- a/kubernetes/client/api/storagemigration_v1alpha1_api.py +++ /dev/null @@ -1,1593 +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.34 - 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', 'application/cbor']) # 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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 bool ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated 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', - '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' - ] - ) - - for key, 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # 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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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 ignore_store_read_error_with_cluster_breaking_potential: if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it - :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. - :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; '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', - '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' - ] - ) - - for key, 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 'ignore_store_read_error_with_cluster_breaking_potential' in local_var_params and local_var_params['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 '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', 'application/cbor']) # 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', 'application/cbor']) # 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/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/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', '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', 'application/apply-patch+cbor']) # 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', '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', 'application/apply-patch+cbor']) # 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', 'application/cbor']) # 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', 'application/cbor']) # 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', 'application/cbor']) # 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', 'application/cbor']) # 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 d722190769..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -42,20 +42,24 @@ def get_code(self, **kwargs): # 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 @@ -66,22 +70,32 @@ def get_code_with_http_info(self, **kwargs): # 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 e6491bc46a..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.34 + 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 1f7c7b81e5..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.34 + 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/34.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 f2460998bc..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -20,9 +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 @@ -50,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: @@ -63,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 """ @@ -107,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 """ @@ -133,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 @@ -159,18 +205,17 @@ def __init__(self, host="http://localhost", """ self.proxy = None + """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") - self.no_proxy = None # 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") - """Proxy URL - """ - self.no_proxy = None """bypass proxy for host in the no_proxy list. """ self.proxy_headers = None @@ -182,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) @@ -199,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. @@ -309,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: @@ -346,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 @@ -363,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.34\n"\ - "SDK Package Version: 34.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): @@ -374,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] @@ -398,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']) @@ -413,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 51856fac2c..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.34 + 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 d51e63e6c4..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.34 + The version of the OpenAPI document: release-1.35 Generated by: https://openapi-generator.tech """ @@ -210,6 +210,7 @@ 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 @@ -546,15 +547,15 @@ 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.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_group_version_resource import V1alpha1GroupVersionResource +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 @@ -565,31 +566,26 @@ 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_pod_certificate_request import V1alpha1PodCertificateRequest -from kubernetes.client.models.v1alpha1_pod_certificate_request_list import V1alpha1PodCertificateRequestList -from kubernetes.client.models.v1alpha1_pod_certificate_request_spec import V1alpha1PodCertificateRequestSpec -from kubernetes.client.models.v1alpha1_pod_certificate_request_status import V1alpha1PodCertificateRequestStatus +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_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_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.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_cel_device_selector import V1alpha3CELDeviceSelector -from kubernetes.client.models.v1alpha3_device_selector import V1alpha3DeviceSelector 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 @@ -645,6 +641,10 @@ from kubernetes.client.models.v1beta1_param_kind import V1beta1ParamKind from kubernetes.client.models.v1beta1_param_ref import V1beta1ParamRef 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 @@ -661,6 +661,10 @@ 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.v1beta1_volume_attributes_class import V1beta1VolumeAttributesClass from kubernetes.client.models.v1beta1_volume_attributes_class_list import V1beta1VolumeAttributesClassList @@ -706,6 +710,11 @@ 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 @@ -730,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 0fe986dcba..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.34 + 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 8bb180bef4..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.34 + 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 e108a756b7..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.34 + 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 4423990538..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.34 + 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 c76c2fb86f..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.34 + 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 2206e9a30f..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.34 + 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 6c7d20f0e8..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.34 + 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 e6306763b6..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.34 + 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 f65314771f..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.34 + 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 97b317ec17..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.34 + 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 index 5276e97589..afd0c74eed 100644 --- a/kubernetes/client/models/core_v1_resource_claim.py +++ b/kubernetes/client/models/core_v1_resource_claim.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.34 + 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 CoreV1ResourceClaim(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._name = None @@ -74,7 +77,7 @@ def name(self, name): 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: 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 @@ -99,32 +102,40 @@ def request(self, request): 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: str + :type request: str """ self._request = request - 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/discovery_v1_endpoint_port.py b/kubernetes/client/models/discovery_v1_endpoint_port.py index 551ef016b1..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.34 + 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 @@ -131,7 +134,7 @@ def port(self, port): 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 4a69759a09..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.34 + 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 e3884287b9..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.34 + 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 30b59b6543..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.34 + 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 bbf34a7ba2..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.34 + 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 a4fc369bca..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.34 + 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 index fe38c5b55f..c2c9c5b9cb 100644 --- a/kubernetes/client/models/resource_v1_resource_claim.py +++ b/kubernetes/client/models/resource_v1_resource_claim.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.34 + 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 ResourceV1ResourceClaim(object): 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() + 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 ResourceV1ResourceClaim. # 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 ResourceV1ResourceClaim. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -133,7 +136,7 @@ def metadata(self, metadata): :param metadata: The metadata of this ResourceV1ResourceClaim. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -154,7 +157,7 @@ def spec(self, spec): :param spec: The spec of this ResourceV1ResourceClaim. # noqa: E501 - :type: V1ResourceClaimSpec + :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 @@ -177,32 +180,40 @@ def status(self, status): :param status: The status of this ResourceV1ResourceClaim. # noqa: E501 - :type: V1ResourceClaimStatus + :type status: V1ResourceClaimStatus """ 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/storage_v1_token_request.py b/kubernetes/client/models/storage_v1_token_request.py index 506b3204e7..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.34 + 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 e3fd1a950b..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.34 + 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 bc9baa166c..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.34 + 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 index 39566554cd..e097cb2675 100644 --- a/kubernetes/client/models/v1_allocated_device_status.py +++ b/kubernetes/client/models/v1_allocated_device_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.34 + 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 V1AllocatedDeviceStatus(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._conditions = None @@ -97,7 +100,7 @@ def conditions(self, conditions): 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: list[V1Condition] + :type conditions: list[V1Condition] """ self._conditions = conditions @@ -120,7 +123,7 @@ def data(self, data): 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: object + :type data: object """ self._data = data @@ -143,7 +146,7 @@ def device(self, device): 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: str + :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 @@ -154,7 +157,7 @@ def device(self, device): 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. # 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 @@ -165,10 +168,10 @@ def driver(self): 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. # 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 :param driver: The driver of this V1AllocatedDeviceStatus. # 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 @@ -191,7 +194,7 @@ def network_data(self, network_data): :param network_data: The network_data of this V1AllocatedDeviceStatus. # noqa: E501 - :type: V1NetworkDeviceData + :type network_data: V1NetworkDeviceData """ self._network_data = network_data @@ -214,7 +217,7 @@ def pool(self, pool): 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: str + :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 @@ -239,32 +242,40 @@ def share_id(self, share_id): ShareID uniquely identifies an individual allocation share of the device. # noqa: E501 :param share_id: The share_id of this V1AllocatedDeviceStatus. # noqa: E501 - :type: str + :type share_id: str """ self._share_id = share_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_allocation_result.py b/kubernetes/client/models/v1_allocation_result.py index db371fc40d..b1cce49873 100644 --- a/kubernetes/client/models/v1_allocation_result.py +++ b/kubernetes/client/models/v1_allocation_result.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.34 + 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 V1AllocationResult(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._allocation_timestamp = None @@ -80,7 +83,7 @@ def allocation_timestamp(self, allocation_timestamp): 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: datetime + :type allocation_timestamp: datetime """ self._allocation_timestamp = allocation_timestamp @@ -101,7 +104,7 @@ def devices(self, devices): :param devices: The devices of this V1AllocationResult. # noqa: E501 - :type: V1DeviceAllocationResult + :type devices: V1DeviceAllocationResult """ self._devices = devices @@ -122,32 +125,40 @@ def node_selector(self, node_selector): :param node_selector: The node_selector of this V1AllocationResult. # noqa: E501 - :type: V1NodeSelector + :type node_selector: V1NodeSelector """ self._node_selector = node_selector - 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.py b/kubernetes/client/models/v1_api_group.py index bf2e3f207c..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.34 + 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 99040c2396..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.34 + 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 35cf3aa86b..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.34 + 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 a0cc5d67c7..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.34 + 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 21d260ee2a..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.34 + 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 f9be1379b4..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.34 + 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 1c22ea3d38..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.34 + 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 c47f1cc33d..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.34 + 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 e4fa5e50c7..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.34 + 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 a4028e6cdb..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.34 + 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 39a81d6223..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.34 + 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 4d861528ce..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.34 + 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 9289b060af..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.34 + 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 dce4e8161b..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.34 + 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 af3584ba3d..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.34 + 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 972387edc3..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.34 + 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 a901ff5891..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.34 + 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 c10ce20e17..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.34 + 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 db83759970..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.34 + 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 ca4e420d34..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.34 + 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 index e0229b4ba5..92de6e4989 100644 --- a/kubernetes/client/models/v1_capacity_request_policy.py +++ b/kubernetes/client/models/v1_capacity_request_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.34 + 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 V1CapacityRequestPolicy(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._default = None @@ -80,7 +83,7 @@ def default(self, default): 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: str + :type default: str """ self._default = default @@ -101,7 +104,7 @@ def valid_range(self, valid_range): :param valid_range: The valid_range of this V1CapacityRequestPolicy. # noqa: E501 - :type: V1CapacityRequestPolicyRange + :type valid_range: V1CapacityRequestPolicyRange """ self._valid_range = valid_range @@ -124,32 +127,40 @@ def valid_values(self, valid_values): 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: list[str] + :type valid_values: list[str] """ self._valid_values = valid_values - 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_range.py b/kubernetes/client/models/v1_capacity_request_policy_range.py index 63f9d48056..2e0564e2a2 100644 --- a/kubernetes/client/models/v1_capacity_request_policy_range.py +++ b/kubernetes/client/models/v1_capacity_request_policy_range.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.34 + 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 V1CapacityRequestPolicyRange(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._max = None @@ -79,7 +82,7 @@ def max(self, max): 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: str + :type max: str """ self._max = max @@ -102,7 +105,7 @@ def min(self, min): 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: str + :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 @@ -127,32 +130,40 @@ def step(self, step): 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: str + :type step: str """ self._step = step - 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_requirements.py b/kubernetes/client/models/v1_capacity_requirements.py index 6d2d1d1243..2fb0f4831b 100644 --- a/kubernetes/client/models/v1_capacity_requirements.py +++ b/kubernetes/client/models/v1_capacity_requirements.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.34 + 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,7 @@ class V1CapacityRequirements(object): and the value is json key in definition. """ openapi_types = { - 'requests': 'dict(str, str)' + 'requests': 'dict[str, str]' } attribute_map = { @@ -43,7 +46,7 @@ class V1CapacityRequirements(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._requests = None @@ -59,7 +62,7 @@ def requests(self): 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) + :rtype: dict[str, str] """ return self._requests @@ -70,32 +73,40 @@ def requests(self, requests): 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: dict(str, str) + :type requests: dict[str, str] """ self._requests = requests - 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_cel_device_selector.py b/kubernetes/client/models/v1_cel_device_selector.py index 4f560e3561..c1c64de4ae 100644 --- a/kubernetes/client/models/v1_cel_device_selector.py +++ b/kubernetes/client/models/v1_cel_device_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.34 + 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 V1CELDeviceSelector(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._expression = None @@ -69,34 +72,42 @@ def expression(self, expression): 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: str + :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): + 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_persistent_volume_source.py b/kubernetes/client/models/v1_ceph_fs_persistent_volume_source.py index e58ff203ad..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.34 + 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 03e189bdc3..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.34 + 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 b1f579b856..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.34 + 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 04075c0adf..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.34 + 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 783f0546e3..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.34 + 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 967dbc32b2..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.34 + 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 f95df792fe..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.34 + 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 d52eafbdec..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.34 + 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 00adcb0fe8..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.34 + 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_client_ip_config.py b/kubernetes/client/models/v1_client_ip_config.py index 063eadf873..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.34 + 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 f1be5dc262..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.34 + 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 4d09220638..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.34 + 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 5ed86f1370..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.34 + 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 87ac2c5ea4..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.34 + 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 c5fd33d652..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.34 + 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 a5e37b2f7c..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.34 + 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 1c6078f003..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.34 + 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 c97175d996..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.34 + 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 965d832bbc..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.34 + 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 4fc1693eab..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.34 + 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 82464b6222..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.34 + 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 2823e06e72..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.34 + 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 9c5a9cd6da..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.34 + 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 e5f2e107ac..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.34 + 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 8ed2ed2086..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.34 + 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 c679238160..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.34 + 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 627bcf8a0e..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.34 + 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 @@ -91,7 +94,7 @@ class V1Container(object): 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 @@ -189,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 @@ -212,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 @@ -235,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 @@ -258,7 +261,7 @@ def env_from(self, env_from): 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 @@ -281,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 @@ -304,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 @@ -325,7 +328,7 @@ def lifecycle(self, lifecycle): :param lifecycle: The lifecycle of this V1Container. # noqa: E501 - :type: V1Lifecycle + :type lifecycle: V1Lifecycle """ self._lifecycle = lifecycle @@ -346,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 @@ -369,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 @@ -394,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 @@ -415,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 @@ -424,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] @@ -435,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 @@ -459,7 +462,7 @@ def resources(self, resources): :param resources: The resources of this V1Container. # noqa: E501 - :type: V1ResourceRequirements + :type resources: V1ResourceRequirements """ self._resources = resources @@ -482,7 +485,7 @@ def restart_policy(self, restart_policy): 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 @@ -505,7 +508,7 @@ def restart_policy_rules(self, restart_policy_rules): 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: list[V1ContainerRestartRule] + :type restart_policy_rules: list[V1ContainerRestartRule] """ self._restart_policy_rules = restart_policy_rules @@ -526,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 @@ -547,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 @@ -570,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 @@ -593,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 @@ -616,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 @@ -639,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 @@ -662,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 @@ -685,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 @@ -708,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 @@ -731,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 index 6eae2f728b..57ffd53050 100644 --- a/kubernetes/client/models/v1_container_extended_resource_request.py +++ b/kubernetes/client/models/v1_container_extended_resource_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.34 + 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 V1ContainerExtendedResourceRequest(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._container_name = None @@ -77,7 +80,7 @@ def container_name(self, container_name): The name of the container requesting resources. # noqa: E501 :param container_name: The container_name of this V1ContainerExtendedResourceRequest. # noqa: E501 - :type: str + :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 @@ -102,7 +105,7 @@ def request_name(self, request_name): 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: str + :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 @@ -127,34 +130,42 @@ def resource_name(self, resource_name): 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: 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 self._resource_name = resource_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_container_image.py b/kubernetes/client/models/v1_container_image.py index c3db0c74fc..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.34 + 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 aba2c95751..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.34 + 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 a40aeda627..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.34 + 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 index 174cd86d85..c053b4749d 100644 --- a/kubernetes/client/models/v1_container_restart_rule.py +++ b/kubernetes/client/models/v1_container_restart_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.34 + 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 V1ContainerRestartRule(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._action = None @@ -74,7 +77,7 @@ def action(self, action): 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: str + :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 @@ -97,32 +100,40 @@ def exit_codes(self, exit_codes): :param exit_codes: The exit_codes of this V1ContainerRestartRule. # noqa: E501 - :type: V1ContainerRestartRuleOnExitCodes + :type exit_codes: V1ContainerRestartRuleOnExitCodes """ self._exit_codes = exit_codes - 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_on_exit_codes.py b/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py index 341a8a04e2..fd43677891 100644 --- a/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.py +++ b/kubernetes/client/models/v1_container_restart_rule_on_exit_codes.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.34 + 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 V1ContainerRestartRuleOnExitCodes(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._operator = None @@ -74,7 +77,7 @@ def operator(self, operator): 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: str + :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 @@ -99,32 +102,40 @@ def values(self, values): 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: list[int] + :type values: list[int] """ self._values = values - 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.py b/kubernetes/client/models/v1_container_state.py index ead4f7b92e..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.34 + 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 382d0b21d8..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.34 + 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 a69ca222bc..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.34 + 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 016d507948..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.34 + 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 d66ca3824f..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.34 + 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,7 @@ 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', @@ -71,7 +74,7 @@ class V1ContainerStatus(object): 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 @@ -124,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 @@ -135,7 +138,7 @@ 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 @@ -158,7 +161,7 @@ def allocated_resources_status(self, allocated_resources_status): 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: list[V1ResourceStatus] + :type allocated_resources_status: list[V1ResourceStatus] """ self._allocated_resources_status = allocated_resources_status @@ -181,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 @@ -204,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 @@ -229,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 @@ -252,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 @@ -275,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 @@ -300,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 @@ -323,7 +326,7 @@ def resources(self, resources): :param resources: The resources of this V1ContainerStatus. # noqa: E501 - :type: V1ResourceRequirements + :type resources: V1ResourceRequirements """ self._resources = resources @@ -346,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 @@ -371,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 @@ -392,7 +395,7 @@ def state(self, state): :param state: The state of this V1ContainerStatus. # noqa: E501 - :type: V1ContainerState + :type state: V1ContainerState """ self._state = state @@ -415,7 +418,7 @@ def stop_signal(self, stop_signal): StopSignal reports the effective stop signal for this container # noqa: E501 :param stop_signal: The stop_signal of this V1ContainerStatus. # noqa: E501 - :type: str + :type stop_signal: str """ self._stop_signal = stop_signal @@ -436,7 +439,7 @@ def user(self, user): :param user: The user of this V1ContainerStatus. # noqa: E501 - :type: V1ContainerUser + :type user: V1ContainerUser """ self._user = user @@ -459,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 index 62a132cf10..91d5237cb8 100644 --- a/kubernetes/client/models/v1_container_user.py +++ b/kubernetes/client/models/v1_container_user.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.34 + 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 V1ContainerUser(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._linux = None @@ -68,32 +71,40 @@ def linux(self, linux): :param linux: The linux of this V1ContainerUser. # noqa: E501 - :type: V1LinuxContainerUser + :type linux: V1LinuxContainerUser """ self._linux = linux - 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.py b/kubernetes/client/models/v1_controller_revision.py index 1492bf6bac..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.34 + 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 eaba37b5d2..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.34 + 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 index 69277a265c..660bb418b6 100644 --- a/kubernetes/client/models/v1_counter.py +++ b/kubernetes/client/models/v1_counter.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.34 + 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 V1Counter(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._value = None @@ -69,34 +72,42 @@ def value(self, value): Value defines how much of a certain device counter is available. # noqa: E501 :param value: The value of this V1Counter. # noqa: E501 - :type: str + :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): + 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_set.py b/kubernetes/client/models/v1_counter_set.py index 7866b0a759..dbcc7abc5f 100644 --- a/kubernetes/client/models/v1_counter_set.py +++ b/kubernetes/client/models/v1_counter_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.34 + 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,7 @@ class V1CounterSet(object): and the value is json key in definition. """ openapi_types = { - 'counters': 'dict(str, V1Counter)', + 'counters': 'dict[str, V1Counter]', 'name': 'str' } @@ -45,7 +48,7 @@ class V1CounterSet(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._counters = None @@ -59,10 +62,10 @@ def __init__(self, counters=None, name=None, local_vars_configuration=None): # 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 in all sets is 32. # 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) + :rtype: dict[str, V1Counter] """ return self._counters @@ -70,10 +73,10 @@ def counters(self): 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 in all sets is 32. # 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 :param counters: The counters of this V1CounterSet. # noqa: E501 - :type: dict(str, V1Counter) + :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 @@ -98,34 +101,42 @@ def name(self, name): 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: 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_cron_job.py b/kubernetes/client/models/v1_cron_job.py index 44bff7fe97..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.34 + 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 70caf8ee60..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.34 + 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 1a466d85ac..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.34 + 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 8486aaf90a..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.34 + 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 5bdf1f0a33..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.34 + 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 644c51ddc6..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.34 + 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 6d0301b267..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.34 + 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 1239b3664e..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.34 + 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 V1CSIDriverSpec(object): '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]' @@ -51,15 +55,16 @@ class V1CSIDriverSpec(object): '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, node_allocatable_update_period_seconds=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 @@ -68,6 +73,7 @@ def __init__(self, attach_required=None, fs_group_policy=None, node_allocatable_ 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 @@ -85,6 +91,8 @@ def __init__(self, attach_required=None, fs_group_policy=None, node_allocatable_ 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: @@ -110,7 +118,7 @@ def attach_required(self, attach_required): 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 @@ -133,7 +141,7 @@ 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 @@ -156,7 +164,7 @@ def node_allocatable_update_period_seconds(self, node_allocatable_update_period_ 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: int + :type node_allocatable_update_period_seconds: int """ self._node_allocatable_update_period_seconds = node_allocatable_update_period_seconds @@ -179,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 @@ -202,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 @@ -225,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 @@ -248,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 @@ -271,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 @@ -294,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 ea04497ac6..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.34 + 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 4619301a6e..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.34 + 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 307b5efa5a..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.34 + 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 e9aab87a16..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.34 + 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 6a58efaafd..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.34 + 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 b3438c7302..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.34 + 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 70742fe71a..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.34 + 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 b32c3b54c0..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.34 + 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 134d7568d5..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.34 + 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 88083cd19a..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.34 + 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 c34b5f0e90..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.34 + 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 f80c1115c5..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.34 + 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 e8eef888e2..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.34 + 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 faf0c856a2..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.34 + 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 ef2ca29285..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.34 + 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 c83ff7c3fe..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.34 + 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 55c8eaff30..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.34 + 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 97efd8ff98..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.34 + 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 f7fc628777..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.34 + 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 f11a7a7f93..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.34 + 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 9f3ab31cc1..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.34 + 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 3d13c27b85..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.34 + 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 a46994adb7..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.34 + 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 c7c5270c2b..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.34 + 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 abdad44a6b..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.34 + 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 a9b11980a7..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.34 + 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 9072149582..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.34 + 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 2f4200062c..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.34 + 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 V1DeleteOptions(object): 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 @@ -105,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 @@ -128,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 @@ -151,7 +154,7 @@ 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 @@ -174,7 +177,7 @@ def ignore_store_read_error_with_cluster_breaking_potential(self, ignore_store_r if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. 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: bool + :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 @@ -197,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 @@ -220,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 @@ -241,7 +244,7 @@ def preconditions(self, preconditions): :param preconditions: The preconditions of this V1DeleteOptions. # noqa: E501 - :type: V1Preconditions + :type preconditions: V1Preconditions """ self._preconditions = preconditions @@ -264,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 a5189b910c..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.34 + 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 ace525cc14..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.34 + 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 690c77deb1..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.34 + 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 97d2af00fb..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.34 + 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 fe63200386..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.34 + 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 V1DeploymentStatus(object): 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 @@ -110,7 +113,7 @@ def available_replicas(self, available_replicas): 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 @@ -133,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 @@ -156,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 @@ -179,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 @@ -202,7 +205,7 @@ def ready_replicas(self, ready_replicas): 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 @@ -225,7 +228,7 @@ def replicas(self, replicas): 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 @@ -234,7 +237,7 @@ def replicas(self, replicas): 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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. # 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 @@ -245,10 +248,10 @@ def terminating_replicas(self): 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 an alpha field. Enable DeploymentReplicaSetTerminatingReplicas to be able to use this field. # 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 :param terminating_replicas: The terminating_replicas of this V1DeploymentStatus. # noqa: E501 - :type: int + :type terminating_replicas: int """ self._terminating_replicas = terminating_replicas @@ -271,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 @@ -294,32 +297,40 @@ def updated_replicas(self, updated_replicas): 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 438e334c34..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.34 + 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 index 0572cc6937..abf8b19044 100644 --- a/kubernetes/client/models/v1_device.py +++ b/kubernetes/client/models/v1_device.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.34 + 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,11 +38,11 @@ class V1Device(object): openapi_types = { 'all_nodes': 'bool', 'allow_multiple_allocations': 'bool', - 'attributes': 'dict(str, V1DeviceAttribute)', + 'attributes': 'dict[str, V1DeviceAttribute]', 'binding_conditions': 'list[str]', 'binding_failure_conditions': 'list[str]', 'binds_to_node': 'bool', - 'capacity': 'dict(str, V1DeviceCapacity)', + 'capacity': 'dict[str, V1DeviceCapacity]', 'consumes_counters': 'list[V1DeviceCounterConsumption]', 'name': 'str', 'node_name': 'str', @@ -65,7 +68,7 @@ class V1Device(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._all_nodes = None @@ -124,7 +127,7 @@ def all_nodes(self, all_nodes): 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: bool + :type all_nodes: bool """ self._all_nodes = all_nodes @@ -147,7 +150,7 @@ def allow_multiple_allocations(self, allow_multiple_allocations): 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: bool + :type allow_multiple_allocations: bool """ self._allow_multiple_allocations = allow_multiple_allocations @@ -159,7 +162,7 @@ def attributes(self): 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) + :rtype: dict[str, V1DeviceAttribute] """ return self._attributes @@ -170,7 +173,7 @@ def attributes(self, attributes): 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: dict(str, V1DeviceAttribute) + :type attributes: dict[str, V1DeviceAttribute] """ self._attributes = attributes @@ -193,7 +196,7 @@ def binding_conditions(self, binding_conditions): 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: list[str] + :type binding_conditions: list[str] """ self._binding_conditions = binding_conditions @@ -216,7 +219,7 @@ def binding_failure_conditions(self, binding_failure_conditions): 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: list[str] + :type binding_failure_conditions: list[str] """ self._binding_failure_conditions = binding_failure_conditions @@ -239,7 +242,7 @@ def binds_to_node(self, binds_to_node): 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: bool + :type binds_to_node: bool """ self._binds_to_node = binds_to_node @@ -251,7 +254,7 @@ def capacity(self): 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) + :rtype: dict[str, V1DeviceCapacity] """ return self._capacity @@ -262,7 +265,7 @@ def capacity(self, capacity): 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: dict(str, V1DeviceCapacity) + :type capacity: dict[str, V1DeviceCapacity] """ self._capacity = capacity @@ -271,7 +274,7 @@ def capacity(self, capacity): 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 total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each). # 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] @@ -282,10 +285,10 @@ def consumes_counters(self): 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 total number of device counter consumption entries must be <= 32. In addition, the total number in the entire ResourceSlice must be <= 1024 (for example, 64 devices with 16 counters each). # 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 :param consumes_counters: The consumes_counters of this V1Device. # noqa: E501 - :type: list[V1DeviceCounterConsumption] + :type consumes_counters: list[V1DeviceCounterConsumption] """ self._consumes_counters = consumes_counters @@ -308,7 +311,7 @@ def name(self, name): 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: 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 @@ -333,7 +336,7 @@ def node_name(self, node_name): 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: str + :type node_name: str """ self._node_name = node_name @@ -354,7 +357,7 @@ def node_selector(self, node_selector): :param node_selector: The node_selector of this V1Device. # noqa: E501 - :type: V1NodeSelector + :type node_selector: V1NodeSelector """ self._node_selector = node_selector @@ -363,7 +366,7 @@ def node_selector(self, node_selector): 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 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # 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] @@ -374,35 +377,43 @@ def taints(self): def taints(self, taints): """Sets the taints of this V1Device. - If specified, these are the driver-defined taints. The maximum number of taints is 4. This is an alpha field and requires enabling the DRADeviceTaints feature gate. # 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 :param taints: The taints of this V1Device. # noqa: E501 - :type: list[V1DeviceTaint] + :type taints: list[V1DeviceTaint] """ self._taints = taints - 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_allocation_configuration.py b/kubernetes/client/models/v1_device_allocation_configuration.py index 39977c79cc..5b1d630d3e 100644 --- a/kubernetes/client/models/v1_device_allocation_configuration.py +++ b/kubernetes/client/models/v1_device_allocation_configuration.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.34 + 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 V1DeviceAllocationConfiguration(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._opaque = None @@ -77,7 +80,7 @@ def opaque(self, opaque): :param opaque: The opaque of this V1DeviceAllocationConfiguration. # noqa: E501 - :type: V1OpaqueDeviceConfiguration + :type opaque: V1OpaqueDeviceConfiguration """ self._opaque = opaque @@ -100,7 +103,7 @@ def requests(self, requests): 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: list[str] + :type requests: list[str] """ self._requests = requests @@ -123,34 +126,42 @@ def source(self, source): 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: str + :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): + 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_allocation_result.py b/kubernetes/client/models/v1_device_allocation_result.py index 0296674a9c..76d6e195a1 100644 --- a/kubernetes/client/models/v1_device_allocation_result.py +++ b/kubernetes/client/models/v1_device_allocation_result.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.34 + 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 V1DeviceAllocationResult(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._config = None @@ -75,7 +78,7 @@ def config(self, config): 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: list[V1DeviceAllocationConfiguration] + :type config: list[V1DeviceAllocationConfiguration] """ self._config = config @@ -98,32 +101,40 @@ def results(self, results): Results lists all allocated devices. # noqa: E501 :param results: The results of this V1DeviceAllocationResult. # noqa: E501 - :type: list[V1DeviceRequestAllocationResult] + :type results: list[V1DeviceRequestAllocationResult] """ self._results = results - 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_attribute.py b/kubernetes/client/models/v1_device_attribute.py index 1f5701c9bd..c681e6886c 100644 --- a/kubernetes/client/models/v1_device_attribute.py +++ b/kubernetes/client/models/v1_device_attribute.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.34 + 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 V1DeviceAttribute(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._bool = None @@ -85,7 +88,7 @@ def bool(self, bool): BoolValue is a true/false value. # noqa: E501 :param bool: The bool of this V1DeviceAttribute. # noqa: E501 - :type: bool + :type bool: bool """ self._bool = bool @@ -108,7 +111,7 @@ def int(self, int): IntValue is a number. # noqa: E501 :param int: The int of this V1DeviceAttribute. # noqa: E501 - :type: int + :type int: int """ self._int = int @@ -131,7 +134,7 @@ def string(self, string): StringValue is a string. Must not be longer than 64 characters. # noqa: E501 :param string: The string of this V1DeviceAttribute. # noqa: E501 - :type: str + :type string: str """ self._string = string @@ -154,32 +157,40 @@ def version(self, version): 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: 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_device_capacity.py b/kubernetes/client/models/v1_device_capacity.py index ed46a09072..1261180c9d 100644 --- a/kubernetes/client/models/v1_device_capacity.py +++ b/kubernetes/client/models/v1_device_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.34 + 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 V1DeviceCapacity(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._request_policy = None @@ -72,7 +75,7 @@ def request_policy(self, request_policy): :param request_policy: The request_policy of this V1DeviceCapacity. # noqa: E501 - :type: V1CapacityRequestPolicy + :type request_policy: V1CapacityRequestPolicy """ self._request_policy = request_policy @@ -95,34 +98,42 @@ def value(self, value): 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: str + :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): + 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_claim.py b/kubernetes/client/models/v1_device_claim.py index 542c611d67..4e14f7424d 100644 --- a/kubernetes/client/models/v1_device_claim.py +++ b/kubernetes/client/models/v1_device_claim.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.34 + 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 V1DeviceClaim(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._config = None @@ -80,7 +83,7 @@ def config(self, config): 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: list[V1DeviceClaimConfiguration] + :type config: list[V1DeviceClaimConfiguration] """ self._config = config @@ -103,7 +106,7 @@ def constraints(self, constraints): 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: list[V1DeviceConstraint] + :type constraints: list[V1DeviceConstraint] """ self._constraints = constraints @@ -126,32 +129,40 @@ def requests(self, requests): 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: list[V1DeviceRequest] + :type requests: list[V1DeviceRequest] """ self._requests = requests - 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_claim_configuration.py b/kubernetes/client/models/v1_device_claim_configuration.py index 7d1622384f..92ad79687a 100644 --- a/kubernetes/client/models/v1_device_claim_configuration.py +++ b/kubernetes/client/models/v1_device_claim_configuration.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.34 + 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 V1DeviceClaimConfiguration(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._opaque = None @@ -73,7 +76,7 @@ def opaque(self, opaque): :param opaque: The opaque of this V1DeviceClaimConfiguration. # noqa: E501 - :type: V1OpaqueDeviceConfiguration + :type opaque: V1OpaqueDeviceConfiguration """ self._opaque = opaque @@ -96,32 +99,40 @@ def requests(self, requests): 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: list[str] + :type requests: list[str] """ self._requests = requests - 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_class.py b/kubernetes/client/models/v1_device_class.py index f1c37fdffa..6dc2b08a6a 100644 --- a/kubernetes/client/models/v1_device_class.py +++ b/kubernetes/client/models/v1_device_class.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.34 + 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 V1DeviceClass(object): 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() + 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 V1DeviceClass. # 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 V1DeviceClass. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -128,7 +131,7 @@ def metadata(self, metadata): :param metadata: The metadata of this V1DeviceClass. # noqa: E501 - :type: V1ObjectMeta + :type metadata: V1ObjectMeta """ self._metadata = metadata @@ -149,34 +152,42 @@ def spec(self, spec): :param spec: The spec of this V1DeviceClass. # noqa: E501 - :type: V1DeviceClassSpec + :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): + 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_class_configuration.py b/kubernetes/client/models/v1_device_class_configuration.py index f2ca5b7cd4..af2d0a52d9 100644 --- a/kubernetes/client/models/v1_device_class_configuration.py +++ b/kubernetes/client/models/v1_device_class_configuration.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.34 + 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 V1DeviceClassConfiguration(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._opaque = None @@ -68,32 +71,40 @@ def opaque(self, opaque): :param opaque: The opaque of this V1DeviceClassConfiguration. # noqa: E501 - :type: V1OpaqueDeviceConfiguration + :type opaque: V1OpaqueDeviceConfiguration """ self._opaque = opaque - 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_class_list.py b/kubernetes/client/models/v1_device_class_list.py index 25e79a8f50..83d2a9072f 100644 --- a/kubernetes/client/models/v1_device_class_list.py +++ b/kubernetes/client/models/v1_device_class_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.34 + 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 V1DeviceClassList(object): 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() + 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 V1DeviceClassList. # 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 resource classes. # noqa: E501 :param items: The items of this V1DeviceClassList. # noqa: E501 - :type: list[V1DeviceClass] + :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 @@ -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 V1DeviceClassList. # noqa: E501 - :type: str + :type kind: str """ self._kind = kind @@ -153,32 +156,40 @@ def metadata(self, metadata): :param metadata: The metadata of this V1DeviceClassList. # 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_device_class_spec.py b/kubernetes/client/models/v1_device_class_spec.py index 6a565b97ac..67080d3b07 100644 --- a/kubernetes/client/models/v1_device_class_spec.py +++ b/kubernetes/client/models/v1_device_class_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.34 + 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 V1DeviceClassSpec(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._config = None @@ -80,7 +83,7 @@ def config(self, config): 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: list[V1DeviceClassConfiguration] + :type config: list[V1DeviceClassConfiguration] """ self._config = config @@ -103,7 +106,7 @@ def extended_resource_name(self, extended_resource_name): 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: str + :type extended_resource_name: str """ self._extended_resource_name = extended_resource_name @@ -126,32 +129,40 @@ def selectors(self, selectors): 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: list[V1DeviceSelector] + :type selectors: list[V1DeviceSelector] """ self._selectors = 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_device_constraint.py b/kubernetes/client/models/v1_device_constraint.py index 6f84dc3fc3..52e5720de4 100644 --- a/kubernetes/client/models/v1_device_constraint.py +++ b/kubernetes/client/models/v1_device_constraint.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.34 + 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 V1DeviceConstraint(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._distinct_attribute = None @@ -80,7 +83,7 @@ def distinct_attribute(self, distinct_attribute): 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: str + :type distinct_attribute: str """ self._distinct_attribute = distinct_attribute @@ -103,7 +106,7 @@ def match_attribute(self, match_attribute): 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: str + :type match_attribute: str """ self._match_attribute = match_attribute @@ -126,32 +129,40 @@ def requests(self, requests): 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: list[str] + :type requests: list[str] """ self._requests = requests - 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_counter_consumption.py b/kubernetes/client/models/v1_device_counter_consumption.py index 2d9ae20274..0b483e585c 100644 --- a/kubernetes/client/models/v1_device_counter_consumption.py +++ b/kubernetes/client/models/v1_device_counter_consumption.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.34 + 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 V1DeviceCounterConsumption(object): """ openapi_types = { 'counter_set': 'str', - 'counters': 'dict(str, V1Counter)' + 'counters': 'dict[str, V1Counter]' } attribute_map = { @@ -45,7 +48,7 @@ class V1DeviceCounterConsumption(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._counter_set = None @@ -73,7 +76,7 @@ def counter_set(self, counter_set): 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: str + :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 @@ -84,10 +87,10 @@ def counter_set(self, counter_set): 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 counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). # 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) + :rtype: dict[str, V1Counter] """ return self._counters @@ -95,37 +98,45 @@ def counters(self): def counters(self, counters): """Sets the counters of this V1DeviceCounterConsumption. - Counters defines the counters that will be consumed by the device. The maximum number counters in a device is 32. In addition, the maximum number of all counters in all devices is 1024 (for example, 64 devices with 16 counters each). # noqa: E501 + 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: dict(str, V1Counter) + :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): + 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_request.py b/kubernetes/client/models/v1_device_request.py index be01eec4db..316b6941c3 100644 --- a/kubernetes/client/models/v1_device_request.py +++ b/kubernetes/client/models/v1_device_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.34 + 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 V1DeviceRequest(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._exactly = None @@ -77,7 +80,7 @@ def exactly(self, exactly): :param exactly: The exactly of this V1DeviceRequest. # noqa: E501 - :type: V1ExactDeviceRequest + :type exactly: V1ExactDeviceRequest """ self._exactly = exactly @@ -100,7 +103,7 @@ def first_available(self, first_available): 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: list[V1DeviceSubRequest] + :type first_available: list[V1DeviceSubRequest] """ self._first_available = first_available @@ -123,34 +126,42 @@ def name(self, name): 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: 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_device_request_allocation_result.py b/kubernetes/client/models/v1_device_request_allocation_result.py index 7c3f111fbc..a0fc56a981 100644 --- a/kubernetes/client/models/v1_device_request_allocation_result.py +++ b/kubernetes/client/models/v1_device_request_allocation_result.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.34 + 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,7 +39,7 @@ class V1DeviceRequestAllocationResult(object): 'admin_access': 'bool', 'binding_conditions': 'list[str]', 'binding_failure_conditions': 'list[str]', - 'consumed_capacity': 'dict(str, str)', + 'consumed_capacity': 'dict[str, str]', 'device': 'str', 'driver': 'str', 'pool': 'str', @@ -61,7 +64,7 @@ class V1DeviceRequestAllocationResult(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._admin_access = None @@ -111,7 +114,7 @@ def admin_access(self, admin_access): 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: bool + :type admin_access: bool """ self._admin_access = admin_access @@ -134,7 +137,7 @@ def binding_conditions(self, binding_conditions): 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: list[str] + :type binding_conditions: list[str] """ self._binding_conditions = binding_conditions @@ -157,7 +160,7 @@ def binding_failure_conditions(self, binding_failure_conditions): 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: list[str] + :type binding_failure_conditions: list[str] """ self._binding_failure_conditions = binding_failure_conditions @@ -169,7 +172,7 @@ def consumed_capacity(self): 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) + :rtype: dict[str, str] """ return self._consumed_capacity @@ -180,7 +183,7 @@ def consumed_capacity(self, consumed_capacity): 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: dict(str, str) + :type consumed_capacity: dict[str, str] """ self._consumed_capacity = consumed_capacity @@ -203,7 +206,7 @@ def device(self, device): 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: str + :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 @@ -214,7 +217,7 @@ def device(self, device): 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. # 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 @@ -225,10 +228,10 @@ def driver(self): 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. # 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 :param driver: The driver of this V1DeviceRequestAllocationResult. # 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 @@ -253,7 +256,7 @@ def pool(self, pool): 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: str + :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 @@ -278,7 +281,7 @@ def request(self, request): 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: 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 @@ -303,7 +306,7 @@ def share_id(self, share_id): 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: str + :type share_id: str """ self._share_id = share_id @@ -326,32 +329,40 @@ def tolerations(self, tolerations): 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: list[V1DeviceToleration] + :type tolerations: list[V1DeviceToleration] """ self._tolerations = tolerations - 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_selector.py b/kubernetes/client/models/v1_device_selector.py index f404483b34..eb3248a310 100644 --- a/kubernetes/client/models/v1_device_selector.py +++ b/kubernetes/client/models/v1_device_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.34 + 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 V1DeviceSelector(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._cel = None @@ -68,32 +71,40 @@ def cel(self, cel): :param cel: The cel of this V1DeviceSelector. # noqa: E501 - :type: V1CELDeviceSelector + :type cel: V1CELDeviceSelector """ self._cel = cel - 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_sub_request.py b/kubernetes/client/models/v1_device_sub_request.py index 2d22f81ba2..c3cc74f37c 100644 --- a/kubernetes/client/models/v1_device_sub_request.py +++ b/kubernetes/client/models/v1_device_sub_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.34 + 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 V1DeviceSubRequest(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._allocation_mode = None @@ -98,7 +101,7 @@ def allocation_mode(self, allocation_mode): 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: str + :type allocation_mode: str """ self._allocation_mode = allocation_mode @@ -119,7 +122,7 @@ def capacity(self, capacity): :param capacity: The capacity of this V1DeviceSubRequest. # noqa: E501 - :type: V1CapacityRequirements + :type capacity: V1CapacityRequirements """ self._capacity = capacity @@ -142,7 +145,7 @@ def count(self, count): 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: int + :type count: int """ self._count = count @@ -165,7 +168,7 @@ def device_class_name(self, device_class_name): 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: str + :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 @@ -190,7 +193,7 @@ def name(self, name): 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: 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 @@ -215,7 +218,7 @@ def selectors(self, selectors): 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: list[V1DeviceSelector] + :type selectors: list[V1DeviceSelector] """ self._selectors = selectors @@ -238,32 +241,40 @@ def tolerations(self, tolerations): 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: list[V1DeviceToleration] + :type tolerations: list[V1DeviceToleration] """ self._tolerations = tolerations - 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_taint.py b/kubernetes/client/models/v1_device_taint.py index 969f1f8f41..2848065a20 100644 --- a/kubernetes/client/models/v1_device_taint.py +++ b/kubernetes/client/models/v1_device_taint.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.34 + 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 V1DeviceTaint(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._effect = None @@ -69,7 +72,7 @@ def __init__(self, effect=None, key=None, time_added=None, value=None, local_var 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 NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. # 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 @@ -80,10 +83,10 @@ def effect(self): 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 NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. # 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 :param effect: The effect of this V1DeviceTaint. # noqa: E501 - :type: str + :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 @@ -108,7 +111,7 @@ def key(self, key): 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: 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 @@ -133,7 +136,7 @@ def time_added(self, time_added): 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: datetime + :type time_added: datetime """ self._time_added = time_added @@ -156,32 +159,40 @@ def value(self, value): 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: str + :type value: str """ self._value = value - 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_toleration.py b/kubernetes/client/models/v1_device_toleration.py index 468d168e25..ff0ba430a0 100644 --- a/kubernetes/client/models/v1_device_toleration.py +++ b/kubernetes/client/models/v1_device_toleration.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.34 + 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 V1DeviceToleration(object): 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() + local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._effect = None @@ -90,7 +93,7 @@ def effect(self, effect): 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: str + :type effect: str """ self._effect = effect @@ -113,7 +116,7 @@ def key(self, key): 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: str + :type key: str """ self._key = key @@ -136,7 +139,7 @@ def operator(self, operator): 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: str + :type operator: str """ self._operator = operator @@ -159,7 +162,7 @@ def toleration_seconds(self, toleration_seconds): 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