oci-cli 3.66.1__py3-none-any.whl → 3.67.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- common_util/ignored_commands.py +3 -1
- oci_cli/bin/jms.psm1 +74 -6
- oci_cli/bin/marketplace.psm1 +7 -1
- oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-gpu-memory-fabric/update.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/compute/image-capability-schema/create.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/image-capability-schema/delete.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/image-capability-schema/update.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/launch-instance-compute-bare-metal-host-placement-constraint-details.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/launch-instance-host-group-placement-constraint-details.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/launch.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-amd-vm-update-instance-platform-config.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-intel-vm-update-instance-platform-config.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-update-instance-source-via-boot-volume-details.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update-instance-update-instance-source-via-image-details.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/instance/update.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/discovery-job/list-discovery-job-results.txt +13 -1
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-error-summary/list-masking-errors.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-policy/list-masking-reports.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/masking-policy/mask-data.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/security-assessment/list-findings.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/sensitive-column/list.txt +22 -1
- oci_cli/help_text_producer/data_files/text/cmdref/data-safe/service/get.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/create-autonomous-database-gcp-key-details.txt +779 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/update-autonomous-database-gcp-key-details.txt +1079 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra/configure-exascale.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-exa-infra.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/create.txt +35 -9
- oci_cli/help_text_producer/data_files/text/cmdref/db/cloud-vm-cluster/update.txt +38 -1
- oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/create.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/list.txt +23 -1
- oci_cli/help_text_producer/data_files/text/cmdref/db/system-shape.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection/create-db.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection/create-exadb-stack.txt +173 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection/create-gi.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection/create-guest-os.txt +180 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection/create.txt +7 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection/update.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection-summary/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-collection.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle/clone.txt +6 -5
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle/create-fsu-cycle-create-upgrade-fsu-cycle.txt +4 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle/create-patch.txt +14 -12
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle/create.txt +4 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle/update-fsu-cycle-exadb-stack-fsu-goal-version-details.txt +230 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle/update-patch.txt +10 -10
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle-summary/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-cycle.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-discovery/create-exadb-stack.txt +173 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-discovery/create-guest-os.txt +185 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update/fsu-discovery.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-software-update.txt +10 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fn/function/create.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fn/function/update.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fusion-apps/fusion-environment/create.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fusion-apps/fusion-environment/update.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/endpoint/create.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/endpoint/update.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint/change-compartment.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint/create.txt +186 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint/delete.txt +133 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint/get.txt +96 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint/update.txt +195 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint-collection/list-generative-ai-private-endpoints.txt +147 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/generative-ai-private-endpoint.txt +22 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-error/{list.txt → list-errors.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log-entry/list-work-request-logs.txt → work-request-log/list.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/work-request-log.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/agent-installer-summary/generate-agent-installer-configuration.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/blocklist/create.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/blocklist/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/container-summary/list-containers.txt +338 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/container-summary.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/export-setting/update.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/fleet-agent-configuration/update.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/installation-usage/summarize.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/jms-plugin/create.txt +12 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/jms-plugin/list.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-application-usage-summary/list-library-application-usage.txt +332 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-application-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-inventory/summarize.txt +284 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-inventory.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-managed-instance-usage-summary/list-library-managed-instance-usage.txt +332 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-managed-instance-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-usage/scan.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/library-usage/summarize.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms/managed-instance-usage/summarize.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-add-installation-site-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-crypto-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-deployed-application-migration-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-java-migration-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-jfr-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-performance-tuning-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-remove-installation-site-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-scan-java-server-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create-task-schedule-scan-library-task-details.txt +148 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/create.txt +150 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/delete.txt +146 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/get.txt +108 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/list.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-add-installation-site-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-crypto-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-deployed-application-migration-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-java-migration-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-jfr-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-performance-tuning-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-remove-installation-site-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-scan-java-server-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update-task-schedule-scan-library-task-details.txt +165 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule/update.txt +171 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/task-schedule.txt +58 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-application-usage-summary/list-uncorrelated-package-application-usage.txt +324 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-application-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-managed-instance-usage-summary/list-uncorrelated-package-managed-instance-usage.txt +324 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-managed-instance-usage-summary.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-usage-summary/list-uncorrelated-package-usage.txt +323 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/uncorrelated-package-usage-summary.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms/work-request/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license/get.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license-acceptance-record/create.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads/java-license-acceptance-record/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-java-downloads.txt +1 -3
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration/get.txt +83 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration/update.txt +99 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/analyze-applications-configuration.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/delete.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/list.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis/request.txt +172 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/java-migration-analysis.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/delete.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/list.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis/request.txt +172 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/performance-tuning-analysis.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration/get.txt +83 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration/update.txt +95 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/subscription-acknowledgment-configuration.txt +16 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-item-summary/list-work-items.txt +110 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-item-summary.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/cancel.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request/list.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-error/list.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-error.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request-log-entry/list-work-request-logs.txt +128 -0
- oci_cli/help_text_producer/data_files/text/cmdref/{governance-rules-control-plane/work-request → jms-utils}/work-request-log-entry.txt +2 -1
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms-utils.txt +65 -0
- oci_cli/help_text_producer/data_files/text/cmdref/jms.txt +76 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/create-marketplace-external-attested-metadata-details/create-marketplace-external-attested-metadata.txt +96 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/create-marketplace-external-attested-metadata-details.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/marketplace-metadata-public-key-summary/list-marketplace-metadata-public-keys.txt +121 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace/marketplace-metadata-public-key-summary.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/marketplace.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/cluster/cluster/create.txt +12 -1
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/cluster/cluster/update.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/add-block-volume.txt +142 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/change-compartment.txt +114 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/create.txt +190 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/delete.txt +140 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/get.txt +100 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/list.txt +163 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore/update.txt +185 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/add-datastore.txt +147 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/attach-to-cluster.txt +153 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/attach-to-esxi-host.txt +155 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/change-compartment.txt +110 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/create.txt +188 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/delete.txt +134 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/detach-from-cluster.txt +134 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/detach-from-esxi-host.txt +155 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/get.txt +96 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/list.txt +163 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/remove-datastore.txt +147 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster/update.txt +182 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore-cluster.txt +37 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/datastore.txt +27 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/esxi-host/create.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/esxi-host/update.txt +6 -2
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list.txt → list-errors.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +43 -1
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/create.txt +127 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/delete.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/get.txt +98 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region/list.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/monitored-region.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/change-compartment.txt +135 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/create.txt +204 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/delete.txt +133 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/disable-oac.txt +129 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/enable-oac.txt +154 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/get.txt +95 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/list.txt +142 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance/update.txt +179 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/resource-analytics-instance.txt +34 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/create.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/delete.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/get.txt +98 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/list.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment/update.txt +137 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/tenancy-attachment.txt +29 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/cancel.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request/list.txt +140 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-error/list.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-error.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-log-entry/list.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request-log-entry.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/resource-analytics.txt +68 -0
- oci_cli/help_text_producer/data_files/text/cmdref/session/authenticate.txt +7 -7
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
- oci_cli/help_text_producer/data_files/text/index.txt +6 -2
- oci_cli/service_mapping.py +11 -1
- oci_cli/version.py +1 -1
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/METADATA +2 -2
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/RECORD +290 -116
- services/core/src/oci_cli_compute/generated/compute_cli.py +194 -28
- services/data_safe/src/oci_cli_data_safe/generated/datasafe_cli.py +28 -9
- services/database/src/oci_cli_database/database_cli_extended.py +43 -2
- services/database/src/oci_cli_database/generated/database_cli.py +830 -4
- services/fleet_software_update/src/oci_cli_fleet_software_update/fleetsoftwareupdate_cli_extended.py +16 -0
- services/fleet_software_update/src/oci_cli_fleet_software_update/generated/fleetsoftwareupdate_cli.py +421 -32
- services/functions/src/oci_cli_functions_management/functionsmanagement_cli_extended.py +87 -5
- services/functions/src/oci_cli_functions_management/generated/functionsmanagement_cli.py +2361 -469
- services/fusion_apps/src/oci_cli_fusion_applications/fusionapplications_cli_extended.py +40 -0
- services/fusion_apps/src/oci_cli_fusion_applications/generated/fusionapplications_cli.py +10 -2
- services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py +399 -2
- services/jms/src/oci_cli_java_management_service/generated/javamanagementservice_cli.py +4359 -2378
- services/jms_java_downloads/src/oci_cli_java_download/generated/javadownload_cli.py +5 -5
- services/jms_utils/__init__.py +4 -0
- services/jms_utils/src/__init__.py +4 -0
- services/jms_utils/src/oci_cli_jms_utils/__init__.py +4 -0
- services/jms_utils/src/oci_cli_jms_utils/generated/__init__.py +4 -0
- services/jms_utils/src/oci_cli_jms_utils/generated/client_mappings.py +14 -0
- services/jms_utils/src/oci_cli_jms_utils/generated/jmsutils_cli.py +812 -0
- services/jms_utils/tests/__init__.py +4 -0
- services/marketplace/src/oci_cli_marketplace/generated/marketplace_cli.py +94 -0
- services/ocvp/src/oci_cli_cluster/generated/cluster_cli.py +9 -5
- services/ocvp/src/oci_cli_datastore/__init__.py +4 -0
- services/ocvp/src/oci_cli_datastore/datastore_cli_extended.py +25 -0
- services/ocvp/src/oci_cli_datastore/generated/__init__.py +4 -0
- services/ocvp/src/oci_cli_datastore/generated/client_mappings.py +14 -0
- services/ocvp/src/oci_cli_datastore/generated/datastore_cli.py +434 -0
- services/ocvp/src/oci_cli_datastore_cluster/__init__.py +4 -0
- services/ocvp/src/oci_cli_datastore_cluster/datastorecluster_cli_extended.py +50 -0
- services/ocvp/src/oci_cli_datastore_cluster/generated/__init__.py +4 -0
- services/ocvp/src/oci_cli_datastore_cluster/generated/client_mappings.py +14 -0
- services/ocvp/src/oci_cli_datastore_cluster/generated/datastorecluster_cli.py +737 -0
- services/ocvp/src/oci_cli_esxi_host/generated/esxihost_cli.py +5 -3
- services/resource_analytics/__init__.py +4 -0
- services/resource_analytics/src/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_monitored_region/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_monitored_region/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_monitored_region/generated/client_mappings.py +14 -0
- services/resource_analytics/src/oci_cli_monitored_region/generated/monitoredregion_cli.py +233 -0
- services/resource_analytics/src/oci_cli_monitored_region/monitored_region_cli_extended.py +39 -0
- services/resource_analytics/src/oci_cli_resource_analytics/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics/generated/resource_analytics_service_cli.py +14 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/client_mappings.py +14 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/generated/resourceanalyticsinstance_cli.py +968 -0
- services/resource_analytics/src/oci_cli_resource_analytics_instance/resource_analytics_instance_cli_extended.py +40 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/generated/__init__.py +4 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/generated/client_mappings.py +14 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/generated/tenancyattachment_cli.py +298 -0
- services/resource_analytics/src/oci_cli_tenancy_attachment/tenancy_attachment_cli_extended.py +39 -0
- services/resource_analytics/tests/__init__.py +4 -0
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/LICENSE.txt +0 -0
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/WHEEL +0 -0
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/entry_points.txt +0 -0
- {oci_cli-3.66.1.dist-info → oci_cli-3.67.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
4
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230701
|
|
5
|
+
|
|
6
|
+
from __future__ import print_function
|
|
7
|
+
import click
|
|
8
|
+
import oci # noqa: F401
|
|
9
|
+
import six # noqa: F401
|
|
10
|
+
import sys # noqa: F401
|
|
11
|
+
from oci_cli import cli_constants # noqa: F401
|
|
12
|
+
from oci_cli import cli_util
|
|
13
|
+
from oci_cli import json_skeleton_utils
|
|
14
|
+
from oci_cli import custom_types # noqa: F401
|
|
15
|
+
from oci_cli.aliasing import CommandGroupWithAlias
|
|
16
|
+
from services.ocvp.src.oci_cli_ocvp.generated import ocvs_service_cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@click.command(cli_util.override('datastore_cluster.datastore_cluster_root_group.command_name', 'datastore-cluster'), cls=CommandGroupWithAlias, help=cli_util.override('datastore_cluster.datastore_cluster_root_group.help', """Use the Oracle Cloud VMware API to create SDDCs and manage ESXi hosts and software.
|
|
20
|
+
For more information, see [Oracle Cloud VMware Solution]."""), short_help=cli_util.override('datastore_cluster.datastore_cluster_root_group.short_help', """Oracle Cloud VMware Solution API"""))
|
|
21
|
+
@cli_util.help_option_group
|
|
22
|
+
def datastore_cluster_root_group():
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@click.command(cli_util.override('datastore_cluster.datastore_cluster_group.command_name', 'datastore-cluster'), cls=CommandGroupWithAlias, help="""An [Oracle Cloud VMware Solution] Datastore Cluster for software-defined data center.
|
|
27
|
+
|
|
28
|
+
The Datastore Cluster combines multiple datastores into a single datastore cluster.""")
|
|
29
|
+
@cli_util.help_option_group
|
|
30
|
+
def datastore_cluster_group():
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
ocvs_service_cli.ocvs_service_group.add_command(datastore_cluster_root_group)
|
|
35
|
+
datastore_cluster_root_group.add_command(datastore_cluster_group)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.add_datastore_to_datastore_cluster.command_name', 'add'), help=u"""Add the specified Datastore to the provided Datastore Cluster. \n[Command Reference](addDatastoreToDatastoreCluster)""")
|
|
39
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
40
|
+
@cli_util.option('--datastore-ids', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of datastores to be added.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
41
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
42
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
43
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
44
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
45
|
+
@json_skeleton_utils.get_cli_json_input_option({'datastore-ids': {'module': 'ocvp', 'class': 'list[string]'}})
|
|
46
|
+
@cli_util.help_option
|
|
47
|
+
@click.pass_context
|
|
48
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'datastore-ids': {'module': 'ocvp', 'class': 'list[string]'}})
|
|
49
|
+
@cli_util.wrap_exceptions
|
|
50
|
+
def add_datastore_to_datastore_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, datastore_ids, if_match):
|
|
51
|
+
|
|
52
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
53
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
54
|
+
|
|
55
|
+
kwargs = {}
|
|
56
|
+
if if_match is not None:
|
|
57
|
+
kwargs['if_match'] = if_match
|
|
58
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
59
|
+
|
|
60
|
+
_details = {}
|
|
61
|
+
_details['datastoreIds'] = cli_util.parse_json_parameter("datastore_ids", datastore_ids)
|
|
62
|
+
|
|
63
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
64
|
+
result = client.add_datastore_to_datastore_cluster(
|
|
65
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
66
|
+
add_datastore_to_datastore_cluster_details=_details,
|
|
67
|
+
**kwargs
|
|
68
|
+
)
|
|
69
|
+
if wait_for_state:
|
|
70
|
+
|
|
71
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
72
|
+
try:
|
|
73
|
+
wait_period_kwargs = {}
|
|
74
|
+
if max_wait_seconds is not None:
|
|
75
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
76
|
+
if wait_interval_seconds is not None:
|
|
77
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
78
|
+
if 'opc-work-request-id' not in result.headers:
|
|
79
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
80
|
+
cli_util.render_response(result, ctx)
|
|
81
|
+
return
|
|
82
|
+
|
|
83
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
84
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
85
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
86
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
87
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
88
|
+
cli_util.render_response(result, ctx)
|
|
89
|
+
sys.exit(2)
|
|
90
|
+
except Exception:
|
|
91
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
92
|
+
cli_util.render_response(result, ctx)
|
|
93
|
+
raise
|
|
94
|
+
else:
|
|
95
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
96
|
+
cli_util.render_response(result, ctx)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.attach_datastore_cluster_to_cluster.command_name', 'attach'), help=u"""Attach the specified Datastore Cluster to the provided Vmware Cluster.
|
|
100
|
+
|
|
101
|
+
Use the [WorkRequest] operations to track the attachment of the Datastore. \n[Command Reference](attachDatastoreClusterToCluster)""")
|
|
102
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
103
|
+
@cli_util.option('--cluster-id', required=True, help=u"""The [OCID] of the VMware cluster to attach the datastore cluster to.""")
|
|
104
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
105
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
106
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
107
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
108
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
109
|
+
@cli_util.help_option
|
|
110
|
+
@click.pass_context
|
|
111
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
112
|
+
@cli_util.wrap_exceptions
|
|
113
|
+
def attach_datastore_cluster_to_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, cluster_id, if_match):
|
|
114
|
+
|
|
115
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
116
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
117
|
+
|
|
118
|
+
kwargs = {}
|
|
119
|
+
if if_match is not None:
|
|
120
|
+
kwargs['if_match'] = if_match
|
|
121
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
122
|
+
|
|
123
|
+
_details = {}
|
|
124
|
+
_details['clusterId'] = cluster_id
|
|
125
|
+
|
|
126
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
127
|
+
result = client.attach_datastore_cluster_to_cluster(
|
|
128
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
129
|
+
attach_datastore_cluster_to_cluster_details=_details,
|
|
130
|
+
**kwargs
|
|
131
|
+
)
|
|
132
|
+
if wait_for_state:
|
|
133
|
+
|
|
134
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
135
|
+
try:
|
|
136
|
+
wait_period_kwargs = {}
|
|
137
|
+
if max_wait_seconds is not None:
|
|
138
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
139
|
+
if wait_interval_seconds is not None:
|
|
140
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
141
|
+
if 'opc-work-request-id' not in result.headers:
|
|
142
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
143
|
+
cli_util.render_response(result, ctx)
|
|
144
|
+
return
|
|
145
|
+
|
|
146
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
147
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
148
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
149
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
150
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
151
|
+
cli_util.render_response(result, ctx)
|
|
152
|
+
sys.exit(2)
|
|
153
|
+
except Exception:
|
|
154
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
155
|
+
cli_util.render_response(result, ctx)
|
|
156
|
+
raise
|
|
157
|
+
else:
|
|
158
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
159
|
+
cli_util.render_response(result, ctx)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.attach_datastore_cluster_to_esxi_host.command_name', 'attach'), help=u"""Attach the specified Datastore Cluster to the provided ESXi Hosts.
|
|
163
|
+
|
|
164
|
+
Use the [WorkRequest] operations to track the attachment of the Datastore. \n[Command Reference](attachDatastoreClusterToEsxiHost)""")
|
|
165
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
166
|
+
@cli_util.option('--esxi-host-id', required=True, help=u"""The [OCID] of the ESXi host to attach the datastore cluster to.""")
|
|
167
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
168
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
169
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
170
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
171
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
172
|
+
@cli_util.help_option
|
|
173
|
+
@click.pass_context
|
|
174
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
175
|
+
@cli_util.wrap_exceptions
|
|
176
|
+
def attach_datastore_cluster_to_esxi_host(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, esxi_host_id, if_match):
|
|
177
|
+
|
|
178
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
179
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
180
|
+
|
|
181
|
+
kwargs = {}
|
|
182
|
+
if if_match is not None:
|
|
183
|
+
kwargs['if_match'] = if_match
|
|
184
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
185
|
+
|
|
186
|
+
_details = {}
|
|
187
|
+
_details['esxiHostId'] = esxi_host_id
|
|
188
|
+
|
|
189
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
190
|
+
result = client.attach_datastore_cluster_to_esxi_host(
|
|
191
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
192
|
+
attach_datastore_cluster_to_esxi_host_details=_details,
|
|
193
|
+
**kwargs
|
|
194
|
+
)
|
|
195
|
+
if wait_for_state:
|
|
196
|
+
|
|
197
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
198
|
+
try:
|
|
199
|
+
wait_period_kwargs = {}
|
|
200
|
+
if max_wait_seconds is not None:
|
|
201
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
202
|
+
if wait_interval_seconds is not None:
|
|
203
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
204
|
+
if 'opc-work-request-id' not in result.headers:
|
|
205
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
206
|
+
cli_util.render_response(result, ctx)
|
|
207
|
+
return
|
|
208
|
+
|
|
209
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
210
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
211
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
212
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
213
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
214
|
+
cli_util.render_response(result, ctx)
|
|
215
|
+
sys.exit(2)
|
|
216
|
+
except Exception:
|
|
217
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
218
|
+
cli_util.render_response(result, ctx)
|
|
219
|
+
raise
|
|
220
|
+
else:
|
|
221
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
222
|
+
cli_util.render_response(result, ctx)
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.change_datastore_cluster_compartment.command_name', 'change-compartment'), help=u"""Moves an Datastore Cluster into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeDatastoreClusterCompartment)""")
|
|
226
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
227
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to move the Datastore Cluster to.""")
|
|
228
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
229
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
230
|
+
@cli_util.help_option
|
|
231
|
+
@click.pass_context
|
|
232
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
233
|
+
@cli_util.wrap_exceptions
|
|
234
|
+
def change_datastore_cluster_compartment(ctx, from_json, datastore_cluster_id, compartment_id, if_match):
|
|
235
|
+
|
|
236
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
237
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
238
|
+
|
|
239
|
+
kwargs = {}
|
|
240
|
+
if if_match is not None:
|
|
241
|
+
kwargs['if_match'] = if_match
|
|
242
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
243
|
+
|
|
244
|
+
_details = {}
|
|
245
|
+
_details['compartmentId'] = compartment_id
|
|
246
|
+
|
|
247
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
248
|
+
result = client.change_datastore_cluster_compartment(
|
|
249
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
250
|
+
change_datastore_cluster_compartment_details=_details,
|
|
251
|
+
**kwargs
|
|
252
|
+
)
|
|
253
|
+
cli_util.render_response(result, ctx)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.create_datastore_cluster.command_name', 'create'), help=u"""Creates a Oracle Cloud VMware Solution Datastore Cluster. \n[Command Reference](createDatastoreCluster)""")
|
|
257
|
+
@cli_util.option('--display-name', required=True, help=u"""A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.""")
|
|
258
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment to contain the Datastore Cluster.""")
|
|
259
|
+
@cli_util.option('--datastore-cluster-type', required=True, type=custom_types.CliCaseInsensitiveChoice(["MANAGEMENT", "WORKLOAD"]), help=u"""Type of the datastore.""")
|
|
260
|
+
@cli_util.option('--availability-domain', required=True, help=u"""The availability domain to create the Datastore Cluster in.""")
|
|
261
|
+
@cli_util.option('--datastore-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The [OCIDs] of the Datastores that belong to the Datastore Cluster.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
262
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
263
|
+
|
|
264
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
265
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
266
|
+
|
|
267
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
268
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
269
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
270
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
271
|
+
@json_skeleton_utils.get_cli_json_input_option({'datastore-ids': {'module': 'ocvp', 'class': 'list[string]'}, 'freeform-tags': {'module': 'ocvp', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ocvp', 'class': 'dict(str, dict(str, object))'}})
|
|
272
|
+
@cli_util.help_option
|
|
273
|
+
@click.pass_context
|
|
274
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'datastore-ids': {'module': 'ocvp', 'class': 'list[string]'}, 'freeform-tags': {'module': 'ocvp', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ocvp', 'class': 'dict(str, dict(str, object))'}})
|
|
275
|
+
@cli_util.wrap_exceptions
|
|
276
|
+
def create_datastore_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, compartment_id, datastore_cluster_type, availability_domain, datastore_ids, freeform_tags, defined_tags):
|
|
277
|
+
|
|
278
|
+
kwargs = {}
|
|
279
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
280
|
+
|
|
281
|
+
_details = {}
|
|
282
|
+
_details['displayName'] = display_name
|
|
283
|
+
_details['compartmentId'] = compartment_id
|
|
284
|
+
_details['datastoreClusterType'] = datastore_cluster_type
|
|
285
|
+
_details['availabilityDomain'] = availability_domain
|
|
286
|
+
|
|
287
|
+
if datastore_ids is not None:
|
|
288
|
+
_details['datastoreIds'] = cli_util.parse_json_parameter("datastore_ids", datastore_ids)
|
|
289
|
+
|
|
290
|
+
if freeform_tags is not None:
|
|
291
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
292
|
+
|
|
293
|
+
if defined_tags is not None:
|
|
294
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
295
|
+
|
|
296
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
297
|
+
result = client.create_datastore_cluster(
|
|
298
|
+
create_datastore_cluster_details=_details,
|
|
299
|
+
**kwargs
|
|
300
|
+
)
|
|
301
|
+
if wait_for_state:
|
|
302
|
+
|
|
303
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
304
|
+
try:
|
|
305
|
+
wait_period_kwargs = {}
|
|
306
|
+
if max_wait_seconds is not None:
|
|
307
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
308
|
+
if wait_interval_seconds is not None:
|
|
309
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
310
|
+
if 'opc-work-request-id' not in result.headers:
|
|
311
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
312
|
+
cli_util.render_response(result, ctx)
|
|
313
|
+
return
|
|
314
|
+
|
|
315
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
316
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
317
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
318
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
319
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
320
|
+
cli_util.render_response(result, ctx)
|
|
321
|
+
sys.exit(2)
|
|
322
|
+
except Exception:
|
|
323
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
324
|
+
cli_util.render_response(result, ctx)
|
|
325
|
+
raise
|
|
326
|
+
else:
|
|
327
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
328
|
+
cli_util.render_response(result, ctx)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.delete_datastore_cluster.command_name', 'delete'), help=u"""Deletes the specified Datastore Cluster. \n[Command Reference](deleteDatastoreCluster)""")
|
|
332
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
333
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
334
|
+
@cli_util.confirm_delete_option
|
|
335
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
336
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
337
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
338
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
339
|
+
@cli_util.help_option
|
|
340
|
+
@click.pass_context
|
|
341
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
342
|
+
@cli_util.wrap_exceptions
|
|
343
|
+
def delete_datastore_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, if_match):
|
|
344
|
+
|
|
345
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
346
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
347
|
+
|
|
348
|
+
kwargs = {}
|
|
349
|
+
if if_match is not None:
|
|
350
|
+
kwargs['if_match'] = if_match
|
|
351
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
352
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
353
|
+
result = client.delete_datastore_cluster(
|
|
354
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
355
|
+
**kwargs
|
|
356
|
+
)
|
|
357
|
+
if wait_for_state:
|
|
358
|
+
|
|
359
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
360
|
+
try:
|
|
361
|
+
wait_period_kwargs = {}
|
|
362
|
+
if max_wait_seconds is not None:
|
|
363
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
364
|
+
if wait_interval_seconds is not None:
|
|
365
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
366
|
+
if 'opc-work-request-id' not in result.headers:
|
|
367
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
368
|
+
cli_util.render_response(result, ctx)
|
|
369
|
+
return
|
|
370
|
+
|
|
371
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
372
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
373
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
374
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
375
|
+
click.echo('Failed to wait until the work request entered the specified state. Please retrieve the work request to find its current state', file=sys.stderr)
|
|
376
|
+
cli_util.render_response(result, ctx)
|
|
377
|
+
sys.exit(2)
|
|
378
|
+
except Exception:
|
|
379
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
380
|
+
cli_util.render_response(result, ctx)
|
|
381
|
+
raise
|
|
382
|
+
else:
|
|
383
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
384
|
+
cli_util.render_response(result, ctx)
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.detach_datastore_cluster_from_cluster.command_name', 'detach'), help=u"""Detach the specified Datastore Cluster from the provided Vmware Cluster.
|
|
388
|
+
|
|
389
|
+
Use the [WorkRequest] operations to track the detachment of the Datastore. \n[Command Reference](detachDatastoreClusterFromCluster)""")
|
|
390
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
391
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
392
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
393
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
394
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
395
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
396
|
+
@cli_util.help_option
|
|
397
|
+
@click.pass_context
|
|
398
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
399
|
+
@cli_util.wrap_exceptions
|
|
400
|
+
def detach_datastore_cluster_from_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, if_match):
|
|
401
|
+
|
|
402
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
403
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
404
|
+
|
|
405
|
+
kwargs = {}
|
|
406
|
+
if if_match is not None:
|
|
407
|
+
kwargs['if_match'] = if_match
|
|
408
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
409
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
410
|
+
result = client.detach_datastore_cluster_from_cluster(
|
|
411
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
412
|
+
**kwargs
|
|
413
|
+
)
|
|
414
|
+
if wait_for_state:
|
|
415
|
+
|
|
416
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
417
|
+
try:
|
|
418
|
+
wait_period_kwargs = {}
|
|
419
|
+
if max_wait_seconds is not None:
|
|
420
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
421
|
+
if wait_interval_seconds is not None:
|
|
422
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
423
|
+
if 'opc-work-request-id' not in result.headers:
|
|
424
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
425
|
+
cli_util.render_response(result, ctx)
|
|
426
|
+
return
|
|
427
|
+
|
|
428
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
429
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
430
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
431
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
432
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
433
|
+
cli_util.render_response(result, ctx)
|
|
434
|
+
sys.exit(2)
|
|
435
|
+
except Exception:
|
|
436
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
437
|
+
cli_util.render_response(result, ctx)
|
|
438
|
+
raise
|
|
439
|
+
else:
|
|
440
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
441
|
+
cli_util.render_response(result, ctx)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.detach_datastore_cluster_from_esxi_host.command_name', 'detach'), help=u"""Detach the specified Datastore Cluster from the provided ESXi Hosts.
|
|
445
|
+
|
|
446
|
+
Use the [WorkRequest] operations to track the detachment of the Datastore. \n[Command Reference](detachDatastoreClusterFromEsxiHost)""")
|
|
447
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
448
|
+
@cli_util.option('--esxi-host-id', required=True, help=u"""The [OCID] of the ESXi host to detach the datastore cluster from.""")
|
|
449
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
450
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
451
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
452
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
453
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
454
|
+
@cli_util.help_option
|
|
455
|
+
@click.pass_context
|
|
456
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
457
|
+
@cli_util.wrap_exceptions
|
|
458
|
+
def detach_datastore_cluster_from_esxi_host(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, esxi_host_id, if_match):
|
|
459
|
+
|
|
460
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
461
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
462
|
+
|
|
463
|
+
kwargs = {}
|
|
464
|
+
if if_match is not None:
|
|
465
|
+
kwargs['if_match'] = if_match
|
|
466
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
467
|
+
|
|
468
|
+
_details = {}
|
|
469
|
+
_details['esxiHostId'] = esxi_host_id
|
|
470
|
+
|
|
471
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
472
|
+
result = client.detach_datastore_cluster_from_esxi_host(
|
|
473
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
474
|
+
detach_datastore_cluster_from_esxi_host_details=_details,
|
|
475
|
+
**kwargs
|
|
476
|
+
)
|
|
477
|
+
if wait_for_state:
|
|
478
|
+
|
|
479
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
480
|
+
try:
|
|
481
|
+
wait_period_kwargs = {}
|
|
482
|
+
if max_wait_seconds is not None:
|
|
483
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
484
|
+
if wait_interval_seconds is not None:
|
|
485
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
486
|
+
if 'opc-work-request-id' not in result.headers:
|
|
487
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
488
|
+
cli_util.render_response(result, ctx)
|
|
489
|
+
return
|
|
490
|
+
|
|
491
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
492
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
493
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
494
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
495
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
496
|
+
cli_util.render_response(result, ctx)
|
|
497
|
+
sys.exit(2)
|
|
498
|
+
except Exception:
|
|
499
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
500
|
+
cli_util.render_response(result, ctx)
|
|
501
|
+
raise
|
|
502
|
+
else:
|
|
503
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
504
|
+
cli_util.render_response(result, ctx)
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.get_datastore_cluster.command_name', 'get'), help=u"""Get the specified Datastore Cluster information. \n[Command Reference](getDatastoreCluster)""")
|
|
508
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
509
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
510
|
+
@cli_util.help_option
|
|
511
|
+
@click.pass_context
|
|
512
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ocvp', 'class': 'DatastoreCluster'})
|
|
513
|
+
@cli_util.wrap_exceptions
|
|
514
|
+
def get_datastore_cluster(ctx, from_json, datastore_cluster_id):
|
|
515
|
+
|
|
516
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
517
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
518
|
+
|
|
519
|
+
kwargs = {}
|
|
520
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
521
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
522
|
+
result = client.get_datastore_cluster(
|
|
523
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
524
|
+
**kwargs
|
|
525
|
+
)
|
|
526
|
+
cli_util.render_response(result, ctx)
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.list_datastore_clusters.command_name', 'list'), help=u"""List the Datastore Clusters in the specified compartment. The list can be filtered by compartment, Datastore Cluster, Display name and Lifecycle state \n[Command Reference](listDatastoreClusters)""")
|
|
530
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
531
|
+
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
|
|
532
|
+
@cli_util.option('--datastore-cluster-id', help=u"""The [OCID] of the Datastore Cluster.""")
|
|
533
|
+
@cli_util.option('--cluster-id', help=u"""The [OCID] of the SDDC Cluster.""")
|
|
534
|
+
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
535
|
+
@cli_util.option('--page', help=u"""For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
536
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.""")
|
|
537
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeCreated", "displayName"]), help=u"""The field to sort by. You can provide one sort order (`sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.
|
|
538
|
+
|
|
539
|
+
**Note:** In general, some \"List\" operations (for example, `ListInstances`) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these \"List\" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.""")
|
|
540
|
+
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""The lifecycle state of the resource.""")
|
|
541
|
+
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.""")
|
|
542
|
+
@cli_util.option('--page-size', type=click.INT, help="""When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.""")
|
|
543
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
544
|
+
@cli_util.help_option
|
|
545
|
+
@click.pass_context
|
|
546
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'ocvp', 'class': 'DatastoreClusterCollection'})
|
|
547
|
+
@cli_util.wrap_exceptions
|
|
548
|
+
def list_datastore_clusters(ctx, from_json, all_pages, page_size, compartment_id, display_name, datastore_cluster_id, cluster_id, limit, page, sort_order, sort_by, lifecycle_state):
|
|
549
|
+
|
|
550
|
+
if all_pages and limit:
|
|
551
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
552
|
+
|
|
553
|
+
kwargs = {}
|
|
554
|
+
if display_name is not None:
|
|
555
|
+
kwargs['display_name'] = display_name
|
|
556
|
+
if datastore_cluster_id is not None:
|
|
557
|
+
kwargs['datastore_cluster_id'] = datastore_cluster_id
|
|
558
|
+
if cluster_id is not None:
|
|
559
|
+
kwargs['cluster_id'] = cluster_id
|
|
560
|
+
if limit is not None:
|
|
561
|
+
kwargs['limit'] = limit
|
|
562
|
+
if page is not None:
|
|
563
|
+
kwargs['page'] = page
|
|
564
|
+
if sort_order is not None:
|
|
565
|
+
kwargs['sort_order'] = sort_order
|
|
566
|
+
if sort_by is not None:
|
|
567
|
+
kwargs['sort_by'] = sort_by
|
|
568
|
+
if lifecycle_state is not None:
|
|
569
|
+
kwargs['lifecycle_state'] = lifecycle_state
|
|
570
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
571
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
572
|
+
if all_pages:
|
|
573
|
+
if page_size:
|
|
574
|
+
kwargs['limit'] = page_size
|
|
575
|
+
|
|
576
|
+
result = cli_util.list_call_get_all_results(
|
|
577
|
+
client.list_datastore_clusters,
|
|
578
|
+
compartment_id=compartment_id,
|
|
579
|
+
**kwargs
|
|
580
|
+
)
|
|
581
|
+
elif limit is not None:
|
|
582
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
583
|
+
client.list_datastore_clusters,
|
|
584
|
+
limit,
|
|
585
|
+
page_size,
|
|
586
|
+
compartment_id=compartment_id,
|
|
587
|
+
**kwargs
|
|
588
|
+
)
|
|
589
|
+
else:
|
|
590
|
+
result = client.list_datastore_clusters(
|
|
591
|
+
compartment_id=compartment_id,
|
|
592
|
+
**kwargs
|
|
593
|
+
)
|
|
594
|
+
cli_util.render_response(result, ctx)
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.remove_datastore_from_datastore_cluster.command_name', 'remove'), help=u"""Remove the specified Datastore from the provided Datastore Cluster. \n[Command Reference](removeDatastoreFromDatastoreCluster)""")
|
|
598
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
599
|
+
@cli_util.option('--datastore-ids', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of datastores to be removed.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
600
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
601
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
602
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
603
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
604
|
+
@json_skeleton_utils.get_cli_json_input_option({'datastore-ids': {'module': 'ocvp', 'class': 'list[string]'}})
|
|
605
|
+
@cli_util.help_option
|
|
606
|
+
@click.pass_context
|
|
607
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'datastore-ids': {'module': 'ocvp', 'class': 'list[string]'}})
|
|
608
|
+
@cli_util.wrap_exceptions
|
|
609
|
+
def remove_datastore_from_datastore_cluster(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, datastore_ids, if_match):
|
|
610
|
+
|
|
611
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
612
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
613
|
+
|
|
614
|
+
kwargs = {}
|
|
615
|
+
if if_match is not None:
|
|
616
|
+
kwargs['if_match'] = if_match
|
|
617
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
618
|
+
|
|
619
|
+
_details = {}
|
|
620
|
+
_details['datastoreIds'] = cli_util.parse_json_parameter("datastore_ids", datastore_ids)
|
|
621
|
+
|
|
622
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
623
|
+
result = client.remove_datastore_from_datastore_cluster(
|
|
624
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
625
|
+
remove_datastore_from_datastore_cluster_details=_details,
|
|
626
|
+
**kwargs
|
|
627
|
+
)
|
|
628
|
+
if wait_for_state:
|
|
629
|
+
|
|
630
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
631
|
+
try:
|
|
632
|
+
wait_period_kwargs = {}
|
|
633
|
+
if max_wait_seconds is not None:
|
|
634
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
635
|
+
if wait_interval_seconds is not None:
|
|
636
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
637
|
+
if 'opc-work-request-id' not in result.headers:
|
|
638
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
639
|
+
cli_util.render_response(result, ctx)
|
|
640
|
+
return
|
|
641
|
+
|
|
642
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
643
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
644
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
645
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
646
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
647
|
+
cli_util.render_response(result, ctx)
|
|
648
|
+
sys.exit(2)
|
|
649
|
+
except Exception:
|
|
650
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
651
|
+
cli_util.render_response(result, ctx)
|
|
652
|
+
raise
|
|
653
|
+
else:
|
|
654
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
655
|
+
cli_util.render_response(result, ctx)
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
@datastore_cluster_group.command(name=cli_util.override('datastore_cluster.update_datastore_cluster.command_name', 'update'), help=u"""Updates the specified Datastore Cluster.
|
|
659
|
+
|
|
660
|
+
**Important:** Updating a Datastore Cluster affects only certain attributes in the `Datastore Cluster` object and does not affect the VMware environment currently running. \n[Command Reference](updateDatastoreCluster)""")
|
|
661
|
+
@cli_util.option('--datastore-cluster-id', required=True, help=u"""The [OCID] of the Datastore Cluster.""")
|
|
662
|
+
@cli_util.option('--display-name', help=u"""A descriptive name for the Datastore Cluster. It must be unique within a SDDC, start with a letter, and contain only letters, digits, whitespaces, dashes and underscores. Avoid entering confidential information.""")
|
|
663
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
664
|
+
|
|
665
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
666
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
667
|
+
|
|
668
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
669
|
+
@cli_util.option('--if-match', help=u"""For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.""")
|
|
670
|
+
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
671
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
672
|
+
@cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.""")
|
|
673
|
+
@cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the work request has reached the state defined by --wait-for-state. Defaults to 30 seconds.""")
|
|
674
|
+
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'ocvp', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ocvp', 'class': 'dict(str, dict(str, object))'}})
|
|
675
|
+
@cli_util.help_option
|
|
676
|
+
@click.pass_context
|
|
677
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'ocvp', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'ocvp', 'class': 'dict(str, dict(str, object))'}})
|
|
678
|
+
@cli_util.wrap_exceptions
|
|
679
|
+
def update_datastore_cluster(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, datastore_cluster_id, display_name, freeform_tags, defined_tags, if_match):
|
|
680
|
+
|
|
681
|
+
if isinstance(datastore_cluster_id, six.string_types) and len(datastore_cluster_id.strip()) == 0:
|
|
682
|
+
raise click.UsageError('Parameter --datastore-cluster-id cannot be whitespace or empty string')
|
|
683
|
+
if not force:
|
|
684
|
+
if freeform_tags or defined_tags:
|
|
685
|
+
if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
686
|
+
ctx.abort()
|
|
687
|
+
|
|
688
|
+
kwargs = {}
|
|
689
|
+
if if_match is not None:
|
|
690
|
+
kwargs['if_match'] = if_match
|
|
691
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
692
|
+
|
|
693
|
+
_details = {}
|
|
694
|
+
|
|
695
|
+
if display_name is not None:
|
|
696
|
+
_details['displayName'] = display_name
|
|
697
|
+
|
|
698
|
+
if freeform_tags is not None:
|
|
699
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
700
|
+
|
|
701
|
+
if defined_tags is not None:
|
|
702
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
703
|
+
|
|
704
|
+
client = cli_util.build_client('ocvp', 'datastore_cluster', ctx)
|
|
705
|
+
result = client.update_datastore_cluster(
|
|
706
|
+
datastore_cluster_id=datastore_cluster_id,
|
|
707
|
+
update_datastore_cluster_details=_details,
|
|
708
|
+
**kwargs
|
|
709
|
+
)
|
|
710
|
+
if wait_for_state:
|
|
711
|
+
|
|
712
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
713
|
+
try:
|
|
714
|
+
wait_period_kwargs = {}
|
|
715
|
+
if max_wait_seconds is not None:
|
|
716
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
717
|
+
if wait_interval_seconds is not None:
|
|
718
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
719
|
+
if 'opc-work-request-id' not in result.headers:
|
|
720
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
721
|
+
cli_util.render_response(result, ctx)
|
|
722
|
+
return
|
|
723
|
+
|
|
724
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
725
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
726
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
727
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
728
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
729
|
+
cli_util.render_response(result, ctx)
|
|
730
|
+
sys.exit(2)
|
|
731
|
+
except Exception:
|
|
732
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
733
|
+
cli_util.render_response(result, ctx)
|
|
734
|
+
raise
|
|
735
|
+
else:
|
|
736
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
737
|
+
cli_util.render_response(result, ctx)
|