oci-cli 3.64.1__py3-none-any.whl → 3.65.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.
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/create-autonomous-container-database-create-autonomous-container-database-from-backup-details.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database/create.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-container-database-backup/list.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/db/data-guard-association/create/with-new-db-system.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-from-backup.txt +10 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/database/create-standby-database.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/database/create.txt +10 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/database/update.txt +11 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/exadb-vm-cluster/create.txt +9 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/exascale-db-storage-vault/list.txt +21 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/gi-version/list.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-backup.txt +42 -27
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-database.txt +42 -27
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch-from-db-system.txt +42 -27
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/launch.txt +42 -27
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/list-db-system-storage-performances.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system/update.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/system-shape/list.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/db/version/list.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list.txt → list-errors.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log-entry/{list-work-request-logs.txt → list-logs.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log-entry.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/goldengate/deployment/create.txt +12 -0
- oci_cli/help_text_producer/data_files/text/cmdref/goldengate/deployment/list.txt +9 -0
- oci_cli/help_text_producer/data_files/text/cmdref/goldengate/deployment/update.txt +12 -0
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh/delete.txt → kafka/cluster/change-compartment.txt} +15 -20
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/virtual-service → kafka/cluster}/create.txt +78 -66
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/project → kafka/cluster}/delete.txt +7 -12
- oci_cli/help_text_producer/data_files/text/cmdref/{os-management/managed-instance/install-all-windows-updates.txt → kafka/cluster/disable-superuser.txt} +17 -17
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh/change-compartment.txt → kafka/cluster/enable-superuser.txt} +17 -18
- oci_cli/help_text_producer/data_files/text/cmdref/{os-management/erratum → kafka/cluster}/get.txt +6 -6
- oci_cli/help_text_producer/data_files/text/cmdref/{dts/export → kafka/cluster}/list.txt +36 -23
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh → kafka/cluster}/update.txt +68 -45
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/project → kafka/cluster-config}/change-compartment.txt +10 -10
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/data-asset → kafka/cluster-config}/create.txt +30 -33
- oci_cli/help_text_producer/data_files/text/cmdref/{os-management/managed-instance-group → kafka/cluster-config}/delete.txt +7 -10
- oci_cli/help_text_producer/data_files/text/cmdref/{os-management/windows-update → kafka/cluster-config}/get.txt +6 -6
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/mesh → kafka/cluster-config}/list.txt +25 -30
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/data-asset → kafka/cluster-config}/update.txt +40 -30
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/work-request/cancel.txt → kafka/cluster-config-version/delete.txt} +12 -7
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection/project → kafka/cluster-config-version}/get.txt +11 -8
- oci_cli/help_text_producer/data_files/text/cmdref/{dts/job → kafka/cluster-config-version}/list.txt +25 -23
- oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster-config-version.txt +18 -0
- oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster-config.txt +29 -0
- oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster.txt +33 -0
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh → kafka}/work-request/cancel.txt +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh → kafka}/work-request/get.txt +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh → kafka}/work-request/list.txt +26 -31
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/work-request/list-work-request-errors.txt → kafka/work-request-error/list.txt} +16 -13
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection → kafka}/work-request-error.txt +2 -1
- oci_cli/help_text_producer/data_files/text/cmdref/{service-mesh/work-request → kafka/work-request-log-entry}/list-work-request-logs.txt +14 -11
- oci_cli/help_text_producer/data_files/text/cmdref/{anomaly-detection → kafka}/work-request-log-entry.txt +2 -1
- oci_cli/help_text_producer/data_files/text/cmdref/kafka/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/kafka.txt +69 -0
- 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 +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list.txt → list-errors.txt} +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
- oci_cli/help_text_producer/data_files/text/index.txt +2 -8
- oci_cli/service_mapping.py +5 -20
- oci_cli/version.py +1 -1
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/METADATA +2 -2
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/RECORD +85 -470
- services/cims/src/oci_cli_incident/cims_cli_extended.py +1 -1
- services/database/src/oci_cli_database/database_cli_extended.py +56 -1
- services/database/src/oci_cli_database/generated/database_cli.py +159 -61
- services/golden_gate/src/oci_cli_golden_gate/generated/goldengate_cli.py +22 -3
- services/{ai_anomaly_detection → managed_kafka}/__init__.py +1 -1
- services/{ai_anomaly_detection → managed_kafka}/src/__init__.py +1 -1
- services/{ai_anomaly_detection/src/oci_cli_anomaly_detection → managed_kafka/src/oci_cli_kafka_cluster}/__init__.py +1 -1
- services/{ai_anomaly_detection/src/oci_cli_anomaly_detection → managed_kafka/src/oci_cli_kafka_cluster}/generated/__init__.py +1 -1
- services/{os_management/src/oci_cli_os_management → managed_kafka/src/oci_cli_kafka_cluster}/generated/client_mappings.py +6 -6
- services/managed_kafka/src/oci_cli_kafka_cluster/generated/kafkacluster_cli.py +1254 -0
- services/managed_kafka/src/oci_cli_kafka_cluster/kafkacluster_cli_extended.py +46 -0
- services/managed_kafka/tests/__init__.py +4 -0
- oci_cli/bin/dts.psm1 +0 -147
- oci_cli/bin/os-management.psm1 +0 -140
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/change-compartment.txt +0 -138
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/create-data-source-atp.txt +0 -207
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/create-data-source-influx.txt +0 -198
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/create-data-source-os.txt +0 -174
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/delete.txt +0 -138
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/get.txt +0 -100
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset/list.txt +0 -146
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/data-asset.txt +0 -30
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/change-compartment.txt +0 -119
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-embedded-input-details.txt +0 -144
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-inline-input-details.txt +0 -185
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-object-list-input-details.txt +0 -173
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create-detect-anomaly-job-object-store-output-details.txt +0 -175
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/create.txt +0 -173
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/delete.txt +0 -143
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/get.txt +0 -105
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job/update.txt +0 -147
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job-collection/list-detect-anomaly-jobs.txt +0 -155
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job-collection.txt +0 -15
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/detect-anomaly-job.txt +0 -31
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/change-compartment.txt +0 -113
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/create.txt +0 -174
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/delete.txt +0 -140
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/detect-anomalies-embedded.txt +0 -124
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/detect-anomalies-inline.txt +0 -139
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/detect-anomalies.txt +0 -125
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/get.txt +0 -100
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/list.txt +0 -148
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model/update.txt +0 -173
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/model.txt +0 -30
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/change-compartment.txt +0 -138
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/create.txt +0 -170
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/delete.txt +0 -137
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/get.txt +0 -99
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/list.txt +0 -147
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe/update.txt +0 -180
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/pe.txt +0 -25
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project/create.txt +0 -152
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project/list.txt +0 -144
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project/update.txt +0 -166
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/project.txt +0 -24
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request/get.txt +0 -91
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request/list.txt +0 -114
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request-error/list.txt +0 -110
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request-log-entry/list-work-request-logs.txt +0 -110
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection/work-request.txt +0 -18
- oci_cli/help_text_producer/data_files/text/cmdref/anomaly-detection.txt +0 -125
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/cancel.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/delete.txt +0 -105
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/get-passphrase.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/list.txt +0 -100
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/never-receive.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/request-entitlement.txt +0 -189
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/request-return-label.txt +0 -249
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/request.txt +0 -188
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/setup-notifications.txt +0 -63
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/show-entitlement.txt +0 -113
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/show.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/update-minimum-storage-capacity.txt +0 -107
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance/update-shipping-address.txt +0 -154
- oci_cli/help_text_producer/data_files/text/cmdref/dts/appliance.txt +0 -38
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/change-compartment.txt +0 -106
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/configure-physical-appliance.txt +0 -114
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/create-policy.txt +0 -68
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/create.txt +0 -226
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/delete.txt +0 -132
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/generate-manifest.txt +0 -97
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/get-passphrase.txt +0 -68
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/request-appliance.txt +0 -68
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/request-return-label.txt +0 -245
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/setup-notifications.txt +0 -51
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/show.txt +0 -96
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export/update.txt +0 -265
- oci_cli/help_text_producer/data_files/text/cmdref/dts/export.txt +0 -38
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/change-compartment.txt +0 -106
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/close.txt +0 -96
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/create.txt +0 -192
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/delete.txt +0 -100
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/detach-devices-details/change-compartment.txt +0 -102
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/detach-devices-details.txt +0 -12
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/setup-notifications.txt +0 -68
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/show.txt +0 -96
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/update.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job/verify-upload-user-credentials.txt +0 -91
- oci_cli/help_text_producer/data_files/text/cmdref/dts/job.txt +0 -34
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/activate.txt +0 -93
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/create.txt +0 -93
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/deactivate.txt +0 -77
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/delete.txt +0 -77
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/get-seal-manifest.txt +0 -81
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/list.txt +0 -67
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/reopen.txt +0 -77
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/seal-status.txt +0 -77
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/seal.txt +0 -75
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/set-export.txt +0 -93
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset/show.txt +0 -77
- oci_cli/help_text_producer/data_files/text/cmdref/dts/nfs-dataset.txt +0 -34
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/configure-encryption.txt +0 -81
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/finalize.txt +0 -89
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/initialize-authentication.txt +0 -106
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/list.txt +0 -63
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/show.txt +0 -67
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/unlock.txt +0 -75
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance/unregister.txt +0 -67
- oci_cli/help_text_producer/data_files/text/cmdref/dts/physical-appliance.txt +0 -26
- oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/configured.txt +0 -111
- oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/copied.txt +0 -105
- oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/monitored.txt +0 -102
- oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/prepared.txt +0 -104
- oci_cli/help_text_producer/data_files/text/cmdref/dts/verify/shipped.txt +0 -106
- oci_cli/help_text_producer/data_files/text/cmdref/dts/verify.txt +0 -22
- oci_cli/help_text_producer/data_files/text/cmdref/dts.txt +0 -144
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/erratum-summary/list-errata.txt +0 -310
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/erratum-summary.txt +0 -15
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/erratum.txt +0 -14
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/delete-content.txt +0 -113
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/get-content.txt +0 -108
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/get-report.txt +0 -270
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/list-related-events.txt +0 -307
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/list.txt +0 -319
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/update.txt +0 -139
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event/upload-content.txt +0 -110
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/event.txt +0 -27
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/attach-child.txt +0 -102
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/attach-parent.txt +0 -104
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/detach-child.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/detach-parent.txt +0 -102
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/disable-module-stream.txt +0 -138
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/enable-module-stream.txt +0 -139
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/get.txt +0 -91
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-all-updates.txt +0 -125
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-module-profile.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-package.txt +0 -123
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-update.txt +0 -123
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/install-windows-update.txt +0 -124
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-packages.txt +0 -142
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-software-sources.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-updates.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-available-windows-updates.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-installed-packages.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-installed-windows-updates.txt +0 -142
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-managed-instance-errata.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-module-profiles.txt +0 -210
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list-module-streams.txt +0 -210
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/list.txt +0 -144
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/remove-module-profile.txt +0 -142
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/remove-package.txt +0 -123
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance/switch-module-stream.txt +0 -138
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/attach.txt +0 -102
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/change-compartment.txt +0 -107
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/create.txt +0 -163
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/detach.txt +0 -99
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/get.txt +0 -94
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/install-all-updates.txt +0 -128
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/list.txt +0 -152
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group/update.txt +0 -166
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance-group.txt +0 -30
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/managed-instance.txt +0 -64
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-profile/get.txt +0 -137
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-profile/list.txt +0 -189
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-profile.txt +0 -16
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-stream/get.txt +0 -132
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-stream/list.txt +0 -188
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/module-stream.txt +0 -16
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/change-compartment.txt +0 -110
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/create.txt +0 -357
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/delete.txt +0 -135
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/get.txt +0 -97
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/list-upcoming.txt +0 -251
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/list.txt +0 -174
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/run-now.txt +0 -106
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/skip-next-execution.txt +0 -106
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job/update.txt +0 -323
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/scheduled-job.txt +0 -30
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/add-packages.txt +0 -111
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/change-compartment.txt +0 -108
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/create.txt +0 -187
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/delete.txt +0 -133
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/get-package.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/get.txt +0 -95
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/list-packages.txt +0 -145
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/list.txt +0 -144
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/remove-packages.txt +0 -112
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/search-packages.txt +0 -124
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source/update.txt +0 -187
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/software-source.txt +0 -34
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/update-managed-instance-details/update-managed-instance.txt +0 -107
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/update-managed-instance-details.txt +0 -14
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/windows-update/list.txt +0 -129
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/windows-update.txt +0 -16
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/get.txt +0 -91
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/list-errors.txt +0 -128
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/list-logs.txt +0 -128
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request/list.txt +0 -148
- oci_cli/help_text_producer/data_files/text/cmdref/os-management/work-request.txt +0 -20
- oci_cli/help_text_producer/data_files/text/cmdref/os-management.txt +0 -187
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/change-compartment.txt +0 -143
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/create.txt +0 -187
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/delete.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/get.txt +0 -103
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/list.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy/update.txt +0 -193
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/access-policy.txt +0 -25
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/debug/report.txt +0 -60
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/debug.txt +0 -14
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/change-compartment.txt +0 -143
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/create.txt +0 -210
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/delete.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/get.txt +0 -103
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/list.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway/update.txt +0 -215
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/change-compartment.txt +0 -147
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/create.txt +0 -197
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/delete.txt +0 -145
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/get.txt +0 -107
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/list.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table/update.txt +0 -203
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway-route-table.txt +0 -25
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/ingress-gateway.txt +0 -26
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/mesh/create.txt +0 -190
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/mesh/get.txt +0 -99
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/mesh.txt +0 -27
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/proxy-details/get.txt +0 -79
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/proxy-details.txt +0 -14
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/change-compartment.txt +0 -143
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/create-virtual-deployment-disabled-service-discovery-configuration.txt +0 -204
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/create-virtual-deployment-dns-service-discovery-configuration.txt +0 -209
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/create.txt +0 -215
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/delete.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/get.txt +0 -103
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/list.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/update-virtual-deployment-disabled-service-discovery-configuration.txt +0 -204
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/update-virtual-deployment-dns-service-discovery-configuration.txt +0 -209
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment/update.txt +0 -215
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-deployment.txt +0 -33
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/change-compartment.txt +0 -141
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/delete.txt +0 -139
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/get.txt +0 -101
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/list.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service/update.txt +0 -211
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/change-compartment.txt +0 -145
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/create.txt +0 -195
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/delete.txt +0 -143
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/get.txt +0 -105
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/list.txt +0 -150
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table/update.txt +0 -201
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service-route-table.txt +0 -25
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/virtual-service.txt +0 -27
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh/work-request.txt +0 -22
- oci_cli/help_text_producer/data_files/text/cmdref/service-mesh.txt +0 -139
- services/ai_anomaly_detection/src/oci_cli_anomaly_detection/anomalydetection_cli_extended.py +0 -234
- services/ai_anomaly_detection/src/oci_cli_anomaly_detection/generated/anomalydetection_cli.py +0 -2665
- services/ai_anomaly_detection/src/oci_cli_anomaly_detection/generated/client_mappings.py +0 -14
- services/ai_anomaly_detection/tests/__init__.py +0 -4
- services/dts/__init__.py +0 -4
- services/dts/src/__init__.py +0 -4
- services/dts/src/oci_cli_appliance_export_job/__init__.py +0 -4
- services/dts/src/oci_cli_appliance_export_job/applianceexportjob_cli_extended.py +0 -582
- services/dts/src/oci_cli_appliance_export_job/applianceexportjob_constants.py +0 -11
- services/dts/src/oci_cli_appliance_export_job/generated/__init__.py +0 -4
- services/dts/src/oci_cli_appliance_export_job/generated/applianceexportjob_cli.py +0 -428
- services/dts/src/oci_cli_appliance_export_job/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_appliance_export_job/manifest/__init__.py +0 -3
- services/dts/src/oci_cli_appliance_export_job/manifest/manifest_constants.py +0 -12
- services/dts/src/oci_cli_appliance_export_job/manifest/manifest_iterator.py +0 -86
- services/dts/src/oci_cli_appliance_export_job/manifest/manifest_line_item.py +0 -22
- services/dts/src/oci_cli_appliance_export_job/manifest/manifest_stats.py +0 -93
- services/dts/src/oci_cli_appliance_export_job/manifest/manifest_stats_consumer.py +0 -15
- services/dts/src/oci_cli_appliance_export_job/manifest/manifest_writer.py +0 -117
- services/dts/src/oci_cli_appliance_export_job/manifest/object_uploader.py +0 -124
- services/dts/src/oci_cli_dts/__init__.py +0 -4
- services/dts/src/oci_cli_dts/appliance_auth_manager.py +0 -59
- services/dts/src/oci_cli_dts/appliance_cert_manager.py +0 -51
- services/dts/src/oci_cli_dts/appliance_client_proxy.py +0 -57
- services/dts/src/oci_cli_dts/appliance_config.py +0 -34
- services/dts/src/oci_cli_dts/appliance_config_manager.py +0 -145
- services/dts/src/oci_cli_dts/appliance_config_spec.py +0 -38
- services/dts/src/oci_cli_dts/appliance_constants.py +0 -35
- services/dts/src/oci_cli_dts/appliance_init_auth.py +0 -81
- services/dts/src/oci_cli_dts/appliance_init_auth_spec.py +0 -32
- services/dts/src/oci_cli_dts/base_client.py +0 -102
- services/dts/src/oci_cli_dts/cli_utils.py +0 -131
- services/dts/src/oci_cli_dts/dts_service_cli_extended.py +0 -95
- services/dts/src/oci_cli_dts/dts_transform.py +0 -31
- services/dts/src/oci_cli_dts/generated/__init__.py +0 -4
- services/dts/src/oci_cli_dts/generated/dts_service_cli.py +0 -14
- services/dts/src/oci_cli_dts/nfs_dataset_client_proxy.py +0 -85
- services/dts/src/oci_cli_dts/nfsdataset_cli_extended.py +0 -371
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/__init__.py +0 -3
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/__init__.py +0 -16
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/diagnose_tools_client.py +0 -163
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/diagnose_tools_client_composite_operations.py +0 -24
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/__init__.py +0 -28
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/dataset_seal_status.py +0 -282
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/details.py +0 -66
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_dataset_info.py +0 -191
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_dataset_spec.py +0 -93
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_export_config.py +0 -174
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/nfs_export_details.py +0 -66
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/object_storage_upload_config.py +0 -201
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/passphrase_details.py +0 -66
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/models/physical_transfer_appliance.py +0 -214
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/nfs_dataset_client.py +0 -835
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/nfs_dataset_client_composite_operations.py +0 -24
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/physical_transfer_appliance_client.py +0 -374
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/client/physical_transfer_appliance_client_composite_operations.py +0 -24
- services/dts/src/oci_cli_dts/physical_appliance_control_plane/service_endpoints.py +0 -9
- services/dts/src/oci_cli_dts/physicalappliance_cli_extended.py +0 -590
- services/dts/src/oci_cli_dts/verify_cli_extended.py +0 -494
- services/dts/src/oci_cli_shipping_vendors/__init__.py +0 -4
- services/dts/src/oci_cli_shipping_vendors/generated/__init__.py +0 -4
- services/dts/src/oci_cli_shipping_vendors/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_shipping_vendors/generated/shippingvendors_cli.py +0 -49
- services/dts/src/oci_cli_transfer_appliance/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_appliance/generated/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_appliance/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_transfer_appliance/generated/transferappliance_cli.py +0 -364
- services/dts/src/oci_cli_transfer_appliance/transferappliance_cli_extended.py +0 -362
- services/dts/src/oci_cli_transfer_appliance_entitlement/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_appliance_entitlement/generated/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_appliance_entitlement/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_transfer_appliance_entitlement/generated/transferapplianceentitlement_cli.py +0 -155
- services/dts/src/oci_cli_transfer_appliance_entitlement/transferapplianceentitlement_cli_extended.py +0 -66
- services/dts/src/oci_cli_transfer_device/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_device/generated/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_device/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_transfer_device/generated/transferdevice_cli.py +0 -209
- services/dts/src/oci_cli_transfer_job/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_job/generated/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_job/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_transfer_job/generated/transferjob_cli.py +0 -368
- services/dts/src/oci_cli_transfer_job/transferjob_cli_extended.py +0 -281
- services/dts/src/oci_cli_transfer_package/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_package/generated/__init__.py +0 -4
- services/dts/src/oci_cli_transfer_package/generated/client_mappings.py +0 -14
- services/dts/src/oci_cli_transfer_package/generated/transferpackage_cli.py +0 -326
- services/dts/tests/__init__.py +0 -4
- services/os_management/__init__.py +0 -4
- services/os_management/src/__init__.py +0 -4
- services/os_management/src/oci_cli_event/__init__.py +0 -4
- services/os_management/src/oci_cli_event/event_cli_extended.py +0 -34
- services/os_management/src/oci_cli_event/generated/__init__.py +0 -4
- services/os_management/src/oci_cli_event/generated/client_mappings.py +0 -14
- services/os_management/src/oci_cli_event/generated/event_cli.py +0 -430
- services/os_management/src/oci_cli_os_management/__init__.py +0 -4
- services/os_management/src/oci_cli_os_management/generated/__init__.py +0 -4
- services/os_management/src/oci_cli_os_management/generated/os_management_service_cli.py +0 -15
- services/os_management/src/oci_cli_os_management/generated/osmanagement_cli.py +0 -4009
- services/os_management/src/oci_cli_os_management/osmanagement_cli_extended.py +0 -244
- services/os_management/tests/__init__.py +0 -4
- services/service_mesh/__init__.py +0 -4
- services/service_mesh/src/__init__.py +0 -4
- services/service_mesh/src/oci_cli_service_mesh/__init__.py +0 -4
- services/service_mesh/src/oci_cli_service_mesh/generated/__init__.py +0 -4
- services/service_mesh/src/oci_cli_service_mesh/generated/client_mappings.py +0 -14
- services/service_mesh/src/oci_cli_service_mesh/generated/servicemesh_cli.py +0 -3306
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_cli_extended.py +0 -57
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/__init__.py +0 -76
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/aggregators/__init__.py +0 -3
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/aggregators/aggregation_orchestrator.py +0 -88
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/bundle_analyser.py +0 -163
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/event.py +0 -43
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/handlers/__init__.py +0 -3
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/handlers/debug_handler.py +0 -209
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/report_orchestrator.py +0 -82
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/task_orchestrator.py +0 -76
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/task_request.py +0 -232
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/__init__.py +0 -3
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/common_worker.py +0 -116
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/csv_worker.py +0 -39
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/file_worker.py +0 -33
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/igd_worker.py +0 -48
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/mesh_report_worker.py +0 -60
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/mesh_resources_worker.py +0 -49
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/namespaces_worker.py +0 -33
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/oci_cli_version_worker.py +0 -34
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/pod_worker.py +0 -112
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/resource_worker.py +0 -75
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/services_worker.py +0 -34
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/task_worker.py +0 -33
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/validate_crds_worker.py +0 -34
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/vdb_worker.py +0 -51
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/tasks/webhooks_worker.py +0 -34
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/__init__.py +0 -3
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/bundle_helper.py +0 -154
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/constants.py +0 -137
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/helper.py +0 -12
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/kubectl_command_helper.py +0 -646
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/messages.py +0 -16
- services/service_mesh/src/oci_cli_service_mesh/service_mesh_troubleshoot/utils/summary.py +0 -222
- services/service_mesh/tests/__init__.py +0 -4
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/LICENSE.txt +0 -0
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/WHEEL +0 -0
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/entry_points.txt +0 -0
- {oci_cli-3.64.1.dist-info → oci_cli-3.65.0.dist-info}/top_level.txt +0 -0
|
@@ -1,3306 +0,0 @@
|
|
|
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: 20220615
|
|
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.cli_root import cli
|
|
12
|
-
from oci_cli import cli_constants # noqa: F401
|
|
13
|
-
from oci_cli import cli_util
|
|
14
|
-
from oci_cli import json_skeleton_utils
|
|
15
|
-
from oci_cli import custom_types # noqa: F401
|
|
16
|
-
from oci_cli.aliasing import CommandGroupWithAlias
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@cli.command(cli_util.override('service_mesh.service_mesh_root_group.command_name', 'service-mesh'), cls=CommandGroupWithAlias, help=cli_util.override('service_mesh.service_mesh_root_group.help', """Use the Service Mesh API to manage mesh, virtual service, access policy and other mesh related items."""), short_help=cli_util.override('service_mesh.service_mesh_root_group.short_help', """Service Mesh API"""))
|
|
20
|
-
@cli_util.help_option_group
|
|
21
|
-
def service_mesh_root_group():
|
|
22
|
-
pass
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@click.command(cli_util.override('service_mesh.virtual_deployment_group.command_name', 'virtual-deployment'), cls=CommandGroupWithAlias, help="""This resource represents a customer-managed virtual service deployment in the Service Mesh.""")
|
|
26
|
-
@cli_util.help_option_group
|
|
27
|
-
def virtual_deployment_group():
|
|
28
|
-
pass
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@click.command(cli_util.override('service_mesh.ingress_gateway_route_table_group.command_name', 'ingress-gateway-route-table'), cls=CommandGroupWithAlias, help="""This resource represents a customer-managed ingress gateway route table in the Service Mesh.""")
|
|
32
|
-
@cli_util.help_option_group
|
|
33
|
-
def ingress_gateway_route_table_group():
|
|
34
|
-
pass
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@click.command(cli_util.override('service_mesh.ingress_gateway_group.command_name', 'ingress-gateway'), cls=CommandGroupWithAlias, help="""An ingress gateway allows resources that are outside of a mesh to communicate to resources that are inside the mesh. It sits on the edge of a service mesh receiving incoming HTTP/TCP connections to the mesh.""")
|
|
38
|
-
@cli_util.help_option_group
|
|
39
|
-
def ingress_gateway_group():
|
|
40
|
-
pass
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
@click.command(cli_util.override('service_mesh.proxy_details_group.command_name', 'proxy-details'), cls=CommandGroupWithAlias, help="""Details of the proxy such as version of the proxy image.""")
|
|
44
|
-
@cli_util.help_option_group
|
|
45
|
-
def proxy_details_group():
|
|
46
|
-
pass
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
@click.command(cli_util.override('service_mesh.access_policy_group.command_name', 'access-policy'), cls=CommandGroupWithAlias, help="""Access policies enable administrators to restrict the access of certain services.""")
|
|
50
|
-
@cli_util.help_option_group
|
|
51
|
-
def access_policy_group():
|
|
52
|
-
pass
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
@click.command(cli_util.override('service_mesh.virtual_service_route_table_group.command_name', 'virtual-service-route-table'), cls=CommandGroupWithAlias, help="""This resource represents a customer-managed service route table in the Service Mesh.""")
|
|
56
|
-
@cli_util.help_option_group
|
|
57
|
-
def virtual_service_route_table_group():
|
|
58
|
-
pass
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
@click.command(cli_util.override('service_mesh.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""A description of the work request status.""")
|
|
62
|
-
@cli_util.help_option_group
|
|
63
|
-
def work_request_group():
|
|
64
|
-
pass
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@click.command(cli_util.override('service_mesh.mesh_group.command_name', 'mesh'), cls=CommandGroupWithAlias, help="""The mesh resource is the top-level container that represents the logical boundary of application traffic between the services and deployments that reside within it. A mesh also provides a unit of access control.""")
|
|
68
|
-
@cli_util.help_option_group
|
|
69
|
-
def mesh_group():
|
|
70
|
-
pass
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@click.command(cli_util.override('service_mesh.virtual_service_group.command_name', 'virtual-service'), cls=CommandGroupWithAlias, help="""This resource represents a customer-managed service in the Service Mesh. Each virtual service declares multiple running versions of the service and maps to a group of instances/pods running a specific version of the actual service.""")
|
|
74
|
-
@cli_util.help_option_group
|
|
75
|
-
def virtual_service_group():
|
|
76
|
-
pass
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
service_mesh_root_group.add_command(virtual_deployment_group)
|
|
80
|
-
service_mesh_root_group.add_command(ingress_gateway_route_table_group)
|
|
81
|
-
service_mesh_root_group.add_command(ingress_gateway_group)
|
|
82
|
-
service_mesh_root_group.add_command(proxy_details_group)
|
|
83
|
-
service_mesh_root_group.add_command(access_policy_group)
|
|
84
|
-
service_mesh_root_group.add_command(virtual_service_route_table_group)
|
|
85
|
-
service_mesh_root_group.add_command(work_request_group)
|
|
86
|
-
service_mesh_root_group.add_command(mesh_group)
|
|
87
|
-
service_mesh_root_group.add_command(virtual_service_group)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
@work_request_group.command(name=cli_util.override('service_mesh.cancel_work_request.command_name', 'cancel'), help=u"""Cancels the work request with the given ID. \n[Command Reference](cancelWorkRequest)""")
|
|
91
|
-
@cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
|
|
92
|
-
@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.""")
|
|
93
|
-
@cli_util.confirm_delete_option
|
|
94
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
95
|
-
@cli_util.help_option
|
|
96
|
-
@click.pass_context
|
|
97
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
98
|
-
@cli_util.wrap_exceptions
|
|
99
|
-
def cancel_work_request(ctx, from_json, work_request_id, if_match):
|
|
100
|
-
|
|
101
|
-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
102
|
-
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
103
|
-
|
|
104
|
-
kwargs = {}
|
|
105
|
-
if if_match is not None:
|
|
106
|
-
kwargs['if_match'] = if_match
|
|
107
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
108
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
109
|
-
result = client.cancel_work_request(
|
|
110
|
-
work_request_id=work_request_id,
|
|
111
|
-
**kwargs
|
|
112
|
-
)
|
|
113
|
-
cli_util.render_response(result, ctx)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
@access_policy_group.command(name=cli_util.override('service_mesh.change_access_policy_compartment.command_name', 'change-compartment'), help=u"""Moves an AccessPolicy resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeAccessPolicyCompartment)""")
|
|
117
|
-
@cli_util.option('--access-policy-id', required=True, help=u"""Unique AccessPolicy identifier.""")
|
|
118
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
119
|
-
@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.""")
|
|
120
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
121
|
-
@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.""")
|
|
122
|
-
@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.""")
|
|
123
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
124
|
-
@cli_util.help_option
|
|
125
|
-
@click.pass_context
|
|
126
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
127
|
-
@cli_util.wrap_exceptions
|
|
128
|
-
def change_access_policy_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, access_policy_id, compartment_id, if_match):
|
|
129
|
-
|
|
130
|
-
if isinstance(access_policy_id, six.string_types) and len(access_policy_id.strip()) == 0:
|
|
131
|
-
raise click.UsageError('Parameter --access-policy-id cannot be whitespace or empty string')
|
|
132
|
-
|
|
133
|
-
kwargs = {}
|
|
134
|
-
if if_match is not None:
|
|
135
|
-
kwargs['if_match'] = if_match
|
|
136
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
137
|
-
|
|
138
|
-
_details = {}
|
|
139
|
-
_details['compartmentId'] = compartment_id
|
|
140
|
-
|
|
141
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
142
|
-
result = client.change_access_policy_compartment(
|
|
143
|
-
access_policy_id=access_policy_id,
|
|
144
|
-
change_access_policy_compartment_details=_details,
|
|
145
|
-
**kwargs
|
|
146
|
-
)
|
|
147
|
-
if wait_for_state:
|
|
148
|
-
|
|
149
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
150
|
-
try:
|
|
151
|
-
wait_period_kwargs = {}
|
|
152
|
-
if max_wait_seconds is not None:
|
|
153
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
154
|
-
if wait_interval_seconds is not None:
|
|
155
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
156
|
-
if 'opc-work-request-id' not in result.headers:
|
|
157
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
158
|
-
cli_util.render_response(result, ctx)
|
|
159
|
-
return
|
|
160
|
-
|
|
161
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
162
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
163
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
164
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
165
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
166
|
-
cli_util.render_response(result, ctx)
|
|
167
|
-
sys.exit(2)
|
|
168
|
-
except Exception:
|
|
169
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
170
|
-
cli_util.render_response(result, ctx)
|
|
171
|
-
raise
|
|
172
|
-
else:
|
|
173
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
174
|
-
cli_util.render_response(result, ctx)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
@ingress_gateway_group.command(name=cli_util.override('service_mesh.change_ingress_gateway_compartment.command_name', 'change-compartment'), help=u"""Moves a IngressGateway resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeIngressGatewayCompartment)""")
|
|
178
|
-
@cli_util.option('--ingress-gateway-id', required=True, help=u"""Unique IngressGateway identifier.""")
|
|
179
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
180
|
-
@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.""")
|
|
181
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
182
|
-
@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.""")
|
|
183
|
-
@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.""")
|
|
184
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
185
|
-
@cli_util.help_option
|
|
186
|
-
@click.pass_context
|
|
187
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
188
|
-
@cli_util.wrap_exceptions
|
|
189
|
-
def change_ingress_gateway_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_id, compartment_id, if_match):
|
|
190
|
-
|
|
191
|
-
if isinstance(ingress_gateway_id, six.string_types) and len(ingress_gateway_id.strip()) == 0:
|
|
192
|
-
raise click.UsageError('Parameter --ingress-gateway-id cannot be whitespace or empty string')
|
|
193
|
-
|
|
194
|
-
kwargs = {}
|
|
195
|
-
if if_match is not None:
|
|
196
|
-
kwargs['if_match'] = if_match
|
|
197
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
198
|
-
|
|
199
|
-
_details = {}
|
|
200
|
-
_details['compartmentId'] = compartment_id
|
|
201
|
-
|
|
202
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
203
|
-
result = client.change_ingress_gateway_compartment(
|
|
204
|
-
ingress_gateway_id=ingress_gateway_id,
|
|
205
|
-
change_ingress_gateway_compartment_details=_details,
|
|
206
|
-
**kwargs
|
|
207
|
-
)
|
|
208
|
-
if wait_for_state:
|
|
209
|
-
|
|
210
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
211
|
-
try:
|
|
212
|
-
wait_period_kwargs = {}
|
|
213
|
-
if max_wait_seconds is not None:
|
|
214
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
215
|
-
if wait_interval_seconds is not None:
|
|
216
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
217
|
-
if 'opc-work-request-id' not in result.headers:
|
|
218
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
219
|
-
cli_util.render_response(result, ctx)
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
223
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
224
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
225
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
226
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
227
|
-
cli_util.render_response(result, ctx)
|
|
228
|
-
sys.exit(2)
|
|
229
|
-
except Exception:
|
|
230
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
231
|
-
cli_util.render_response(result, ctx)
|
|
232
|
-
raise
|
|
233
|
-
else:
|
|
234
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
235
|
-
cli_util.render_response(result, ctx)
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
@ingress_gateway_route_table_group.command(name=cli_util.override('service_mesh.change_ingress_gateway_route_table_compartment.command_name', 'change-compartment'), help=u"""Moves a IngressGatewayRouteTable resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeIngressGatewayRouteTableCompartment)""")
|
|
239
|
-
@cli_util.option('--ingress-gateway-route-table-id', required=True, help=u"""Unique IngressGatewayRouteTable identifier.""")
|
|
240
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
241
|
-
@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.""")
|
|
242
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
243
|
-
@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.""")
|
|
244
|
-
@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.""")
|
|
245
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
246
|
-
@cli_util.help_option
|
|
247
|
-
@click.pass_context
|
|
248
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
249
|
-
@cli_util.wrap_exceptions
|
|
250
|
-
def change_ingress_gateway_route_table_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_route_table_id, compartment_id, if_match):
|
|
251
|
-
|
|
252
|
-
if isinstance(ingress_gateway_route_table_id, six.string_types) and len(ingress_gateway_route_table_id.strip()) == 0:
|
|
253
|
-
raise click.UsageError('Parameter --ingress-gateway-route-table-id cannot be whitespace or empty string')
|
|
254
|
-
|
|
255
|
-
kwargs = {}
|
|
256
|
-
if if_match is not None:
|
|
257
|
-
kwargs['if_match'] = if_match
|
|
258
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
259
|
-
|
|
260
|
-
_details = {}
|
|
261
|
-
_details['compartmentId'] = compartment_id
|
|
262
|
-
|
|
263
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
264
|
-
result = client.change_ingress_gateway_route_table_compartment(
|
|
265
|
-
ingress_gateway_route_table_id=ingress_gateway_route_table_id,
|
|
266
|
-
change_ingress_gateway_route_table_compartment_details=_details,
|
|
267
|
-
**kwargs
|
|
268
|
-
)
|
|
269
|
-
if wait_for_state:
|
|
270
|
-
|
|
271
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
272
|
-
try:
|
|
273
|
-
wait_period_kwargs = {}
|
|
274
|
-
if max_wait_seconds is not None:
|
|
275
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
276
|
-
if wait_interval_seconds is not None:
|
|
277
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
278
|
-
if 'opc-work-request-id' not in result.headers:
|
|
279
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
280
|
-
cli_util.render_response(result, ctx)
|
|
281
|
-
return
|
|
282
|
-
|
|
283
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
284
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
285
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
286
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
287
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
288
|
-
cli_util.render_response(result, ctx)
|
|
289
|
-
sys.exit(2)
|
|
290
|
-
except Exception:
|
|
291
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
292
|
-
cli_util.render_response(result, ctx)
|
|
293
|
-
raise
|
|
294
|
-
else:
|
|
295
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
296
|
-
cli_util.render_response(result, ctx)
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
@mesh_group.command(name=cli_util.override('service_mesh.change_mesh_compartment.command_name', 'change-compartment'), help=u"""Moves a Mesh resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeMeshCompartment)""")
|
|
300
|
-
@cli_util.option('--mesh-id', required=True, help=u"""Unique Mesh identifier.""")
|
|
301
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
302
|
-
@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.""")
|
|
303
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
304
|
-
@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.""")
|
|
305
|
-
@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.""")
|
|
306
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
307
|
-
@cli_util.help_option
|
|
308
|
-
@click.pass_context
|
|
309
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
310
|
-
@cli_util.wrap_exceptions
|
|
311
|
-
def change_mesh_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, mesh_id, compartment_id, if_match):
|
|
312
|
-
|
|
313
|
-
if isinstance(mesh_id, six.string_types) and len(mesh_id.strip()) == 0:
|
|
314
|
-
raise click.UsageError('Parameter --mesh-id cannot be whitespace or empty string')
|
|
315
|
-
|
|
316
|
-
kwargs = {}
|
|
317
|
-
if if_match is not None:
|
|
318
|
-
kwargs['if_match'] = if_match
|
|
319
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
320
|
-
|
|
321
|
-
_details = {}
|
|
322
|
-
_details['compartmentId'] = compartment_id
|
|
323
|
-
|
|
324
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
325
|
-
result = client.change_mesh_compartment(
|
|
326
|
-
mesh_id=mesh_id,
|
|
327
|
-
change_mesh_compartment_details=_details,
|
|
328
|
-
**kwargs
|
|
329
|
-
)
|
|
330
|
-
if wait_for_state:
|
|
331
|
-
|
|
332
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
333
|
-
try:
|
|
334
|
-
wait_period_kwargs = {}
|
|
335
|
-
if max_wait_seconds is not None:
|
|
336
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
337
|
-
if wait_interval_seconds is not None:
|
|
338
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
339
|
-
if 'opc-work-request-id' not in result.headers:
|
|
340
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
341
|
-
cli_util.render_response(result, ctx)
|
|
342
|
-
return
|
|
343
|
-
|
|
344
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
345
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
346
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
347
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
348
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
349
|
-
cli_util.render_response(result, ctx)
|
|
350
|
-
sys.exit(2)
|
|
351
|
-
except Exception:
|
|
352
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
353
|
-
cli_util.render_response(result, ctx)
|
|
354
|
-
raise
|
|
355
|
-
else:
|
|
356
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
357
|
-
cli_util.render_response(result, ctx)
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.change_virtual_deployment_compartment.command_name', 'change-compartment'), help=u"""Moves a VirtualDeployment resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeVirtualDeploymentCompartment)""")
|
|
361
|
-
@cli_util.option('--virtual-deployment-id', required=True, help=u"""Unique VirtualDeployment identifier.""")
|
|
362
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
363
|
-
@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.""")
|
|
364
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
365
|
-
@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.""")
|
|
366
|
-
@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.""")
|
|
367
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
368
|
-
@cli_util.help_option
|
|
369
|
-
@click.pass_context
|
|
370
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
371
|
-
@cli_util.wrap_exceptions
|
|
372
|
-
def change_virtual_deployment_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_deployment_id, compartment_id, if_match):
|
|
373
|
-
|
|
374
|
-
if isinstance(virtual_deployment_id, six.string_types) and len(virtual_deployment_id.strip()) == 0:
|
|
375
|
-
raise click.UsageError('Parameter --virtual-deployment-id cannot be whitespace or empty string')
|
|
376
|
-
|
|
377
|
-
kwargs = {}
|
|
378
|
-
if if_match is not None:
|
|
379
|
-
kwargs['if_match'] = if_match
|
|
380
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
381
|
-
|
|
382
|
-
_details = {}
|
|
383
|
-
_details['compartmentId'] = compartment_id
|
|
384
|
-
|
|
385
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
386
|
-
result = client.change_virtual_deployment_compartment(
|
|
387
|
-
virtual_deployment_id=virtual_deployment_id,
|
|
388
|
-
change_virtual_deployment_compartment_details=_details,
|
|
389
|
-
**kwargs
|
|
390
|
-
)
|
|
391
|
-
if wait_for_state:
|
|
392
|
-
|
|
393
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
394
|
-
try:
|
|
395
|
-
wait_period_kwargs = {}
|
|
396
|
-
if max_wait_seconds is not None:
|
|
397
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
398
|
-
if wait_interval_seconds is not None:
|
|
399
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
400
|
-
if 'opc-work-request-id' not in result.headers:
|
|
401
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
402
|
-
cli_util.render_response(result, ctx)
|
|
403
|
-
return
|
|
404
|
-
|
|
405
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
406
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
407
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
408
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
409
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
410
|
-
cli_util.render_response(result, ctx)
|
|
411
|
-
sys.exit(2)
|
|
412
|
-
except Exception:
|
|
413
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
414
|
-
cli_util.render_response(result, ctx)
|
|
415
|
-
raise
|
|
416
|
-
else:
|
|
417
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
418
|
-
cli_util.render_response(result, ctx)
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
@virtual_service_group.command(name=cli_util.override('service_mesh.change_virtual_service_compartment.command_name', 'change-compartment'), help=u"""Moves a VirtualService resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeVirtualServiceCompartment)""")
|
|
422
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""Unique VirtualService identifier.""")
|
|
423
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
424
|
-
@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.""")
|
|
425
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
426
|
-
@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.""")
|
|
427
|
-
@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.""")
|
|
428
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
429
|
-
@cli_util.help_option
|
|
430
|
-
@click.pass_context
|
|
431
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
432
|
-
@cli_util.wrap_exceptions
|
|
433
|
-
def change_virtual_service_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, compartment_id, if_match):
|
|
434
|
-
|
|
435
|
-
if isinstance(virtual_service_id, six.string_types) and len(virtual_service_id.strip()) == 0:
|
|
436
|
-
raise click.UsageError('Parameter --virtual-service-id cannot be whitespace or empty string')
|
|
437
|
-
|
|
438
|
-
kwargs = {}
|
|
439
|
-
if if_match is not None:
|
|
440
|
-
kwargs['if_match'] = if_match
|
|
441
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
442
|
-
|
|
443
|
-
_details = {}
|
|
444
|
-
_details['compartmentId'] = compartment_id
|
|
445
|
-
|
|
446
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
447
|
-
result = client.change_virtual_service_compartment(
|
|
448
|
-
virtual_service_id=virtual_service_id,
|
|
449
|
-
change_virtual_service_compartment_details=_details,
|
|
450
|
-
**kwargs
|
|
451
|
-
)
|
|
452
|
-
if wait_for_state:
|
|
453
|
-
|
|
454
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
455
|
-
try:
|
|
456
|
-
wait_period_kwargs = {}
|
|
457
|
-
if max_wait_seconds is not None:
|
|
458
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
459
|
-
if wait_interval_seconds is not None:
|
|
460
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
461
|
-
if 'opc-work-request-id' not in result.headers:
|
|
462
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
463
|
-
cli_util.render_response(result, ctx)
|
|
464
|
-
return
|
|
465
|
-
|
|
466
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
467
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
468
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
469
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
470
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
471
|
-
cli_util.render_response(result, ctx)
|
|
472
|
-
sys.exit(2)
|
|
473
|
-
except Exception:
|
|
474
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
475
|
-
cli_util.render_response(result, ctx)
|
|
476
|
-
raise
|
|
477
|
-
else:
|
|
478
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
479
|
-
cli_util.render_response(result, ctx)
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
@virtual_service_route_table_group.command(name=cli_util.override('service_mesh.change_virtual_service_route_table_compartment.command_name', 'change-compartment'), help=u"""Moves a VirtualServiceRouteTable resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource. \n[Command Reference](changeVirtualServiceRouteTableCompartment)""")
|
|
483
|
-
@cli_util.option('--virtual-service-route-table-id', required=True, help=u"""Unique VirtualServiceRouteTable identifier.""")
|
|
484
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
485
|
-
@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.""")
|
|
486
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
487
|
-
@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.""")
|
|
488
|
-
@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.""")
|
|
489
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
490
|
-
@cli_util.help_option
|
|
491
|
-
@click.pass_context
|
|
492
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
493
|
-
@cli_util.wrap_exceptions
|
|
494
|
-
def change_virtual_service_route_table_compartment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_route_table_id, compartment_id, if_match):
|
|
495
|
-
|
|
496
|
-
if isinstance(virtual_service_route_table_id, six.string_types) and len(virtual_service_route_table_id.strip()) == 0:
|
|
497
|
-
raise click.UsageError('Parameter --virtual-service-route-table-id cannot be whitespace or empty string')
|
|
498
|
-
|
|
499
|
-
kwargs = {}
|
|
500
|
-
if if_match is not None:
|
|
501
|
-
kwargs['if_match'] = if_match
|
|
502
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
503
|
-
|
|
504
|
-
_details = {}
|
|
505
|
-
_details['compartmentId'] = compartment_id
|
|
506
|
-
|
|
507
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
508
|
-
result = client.change_virtual_service_route_table_compartment(
|
|
509
|
-
virtual_service_route_table_id=virtual_service_route_table_id,
|
|
510
|
-
change_virtual_service_route_table_compartment_details=_details,
|
|
511
|
-
**kwargs
|
|
512
|
-
)
|
|
513
|
-
if wait_for_state:
|
|
514
|
-
|
|
515
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
516
|
-
try:
|
|
517
|
-
wait_period_kwargs = {}
|
|
518
|
-
if max_wait_seconds is not None:
|
|
519
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
520
|
-
if wait_interval_seconds is not None:
|
|
521
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
522
|
-
if 'opc-work-request-id' not in result.headers:
|
|
523
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
524
|
-
cli_util.render_response(result, ctx)
|
|
525
|
-
return
|
|
526
|
-
|
|
527
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
528
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
529
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
530
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
531
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
532
|
-
cli_util.render_response(result, ctx)
|
|
533
|
-
sys.exit(2)
|
|
534
|
-
except Exception:
|
|
535
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
536
|
-
cli_util.render_response(result, ctx)
|
|
537
|
-
raise
|
|
538
|
-
else:
|
|
539
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
540
|
-
cli_util.render_response(result, ctx)
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
@access_policy_group.command(name=cli_util.override('service_mesh.create_access_policy.command_name', 'create'), help=u"""Creates a new AccessPolicy. \n[Command Reference](createAccessPolicy)""")
|
|
544
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information.
|
|
545
|
-
|
|
546
|
-
Example: `My unique resource name`""")
|
|
547
|
-
@cli_util.option('--mesh-id', required=True, help=u"""The OCID of the service mesh in which this access policy is created.""")
|
|
548
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
549
|
-
@cli_util.option('--rules', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of applicable rules""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
550
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
551
|
-
|
|
552
|
-
Example: `This is my new resource`""")
|
|
553
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
554
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
555
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
556
|
-
@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.""")
|
|
557
|
-
@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.""")
|
|
558
|
-
@json_skeleton_utils.get_cli_json_input_option({'rules': {'module': 'service_mesh', 'class': 'list[AccessPolicyRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
559
|
-
@cli_util.help_option
|
|
560
|
-
@click.pass_context
|
|
561
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'rules': {'module': 'service_mesh', 'class': 'list[AccessPolicyRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'AccessPolicy'})
|
|
562
|
-
@cli_util.wrap_exceptions
|
|
563
|
-
def create_access_policy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, mesh_id, compartment_id, rules, description, freeform_tags, defined_tags):
|
|
564
|
-
|
|
565
|
-
kwargs = {}
|
|
566
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
567
|
-
|
|
568
|
-
_details = {}
|
|
569
|
-
_details['name'] = name
|
|
570
|
-
_details['meshId'] = mesh_id
|
|
571
|
-
_details['compartmentId'] = compartment_id
|
|
572
|
-
_details['rules'] = cli_util.parse_json_parameter("rules", rules)
|
|
573
|
-
|
|
574
|
-
if description is not None:
|
|
575
|
-
_details['description'] = description
|
|
576
|
-
|
|
577
|
-
if freeform_tags is not None:
|
|
578
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
579
|
-
|
|
580
|
-
if defined_tags is not None:
|
|
581
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
582
|
-
|
|
583
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
584
|
-
result = client.create_access_policy(
|
|
585
|
-
create_access_policy_details=_details,
|
|
586
|
-
**kwargs
|
|
587
|
-
)
|
|
588
|
-
if wait_for_state:
|
|
589
|
-
|
|
590
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
591
|
-
try:
|
|
592
|
-
wait_period_kwargs = {}
|
|
593
|
-
if max_wait_seconds is not None:
|
|
594
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
595
|
-
if wait_interval_seconds is not None:
|
|
596
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
597
|
-
if 'opc-work-request-id' not in result.headers:
|
|
598
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
599
|
-
cli_util.render_response(result, ctx)
|
|
600
|
-
return
|
|
601
|
-
|
|
602
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
603
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
604
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
605
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
606
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
607
|
-
cli_util.render_response(result, ctx)
|
|
608
|
-
sys.exit(2)
|
|
609
|
-
except Exception:
|
|
610
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
611
|
-
cli_util.render_response(result, ctx)
|
|
612
|
-
raise
|
|
613
|
-
else:
|
|
614
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
615
|
-
cli_util.render_response(result, ctx)
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
@ingress_gateway_group.command(name=cli_util.override('service_mesh.create_ingress_gateway.command_name', 'create'), help=u"""Creates a new IngressGateway. \n[Command Reference](createIngressGateway)""")
|
|
619
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information.
|
|
620
|
-
|
|
621
|
-
Example: `My unique resource name`""")
|
|
622
|
-
@cli_util.option('--mesh-id', required=True, help=u"""The OCID of the service mesh in which this ingress gateway is created.""")
|
|
623
|
-
@cli_util.option('--hosts', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of hostnames and their listener configuration that this gateway will bind to.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
624
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
625
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
626
|
-
|
|
627
|
-
Example: `This is my new resource`""")
|
|
628
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
629
|
-
@cli_util.option('--mtls', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
630
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
631
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
632
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
633
|
-
@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.""")
|
|
634
|
-
@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.""")
|
|
635
|
-
@json_skeleton_utils.get_cli_json_input_option({'hosts': {'module': 'service_mesh', 'class': 'list[IngressGatewayHost]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'mtls': {'module': 'service_mesh', 'class': 'IngressGatewayMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
636
|
-
@cli_util.help_option
|
|
637
|
-
@click.pass_context
|
|
638
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'hosts': {'module': 'service_mesh', 'class': 'list[IngressGatewayHost]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'mtls': {'module': 'service_mesh', 'class': 'IngressGatewayMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'IngressGateway'})
|
|
639
|
-
@cli_util.wrap_exceptions
|
|
640
|
-
def create_ingress_gateway(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, name, mesh_id, hosts, compartment_id, description, access_logging, mtls, freeform_tags, defined_tags):
|
|
641
|
-
|
|
642
|
-
kwargs = {}
|
|
643
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
644
|
-
|
|
645
|
-
_details = {}
|
|
646
|
-
_details['name'] = name
|
|
647
|
-
_details['meshId'] = mesh_id
|
|
648
|
-
_details['hosts'] = cli_util.parse_json_parameter("hosts", hosts)
|
|
649
|
-
_details['compartmentId'] = compartment_id
|
|
650
|
-
|
|
651
|
-
if description is not None:
|
|
652
|
-
_details['description'] = description
|
|
653
|
-
|
|
654
|
-
if access_logging is not None:
|
|
655
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
656
|
-
|
|
657
|
-
if mtls is not None:
|
|
658
|
-
_details['mtls'] = cli_util.parse_json_parameter("mtls", mtls)
|
|
659
|
-
|
|
660
|
-
if freeform_tags is not None:
|
|
661
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
662
|
-
|
|
663
|
-
if defined_tags is not None:
|
|
664
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
665
|
-
|
|
666
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
667
|
-
result = client.create_ingress_gateway(
|
|
668
|
-
create_ingress_gateway_details=_details,
|
|
669
|
-
**kwargs
|
|
670
|
-
)
|
|
671
|
-
if wait_for_state:
|
|
672
|
-
|
|
673
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
674
|
-
try:
|
|
675
|
-
wait_period_kwargs = {}
|
|
676
|
-
if max_wait_seconds is not None:
|
|
677
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
678
|
-
if wait_interval_seconds is not None:
|
|
679
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
680
|
-
if 'opc-work-request-id' not in result.headers:
|
|
681
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
682
|
-
cli_util.render_response(result, ctx)
|
|
683
|
-
return
|
|
684
|
-
|
|
685
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
686
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
687
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
688
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
689
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
690
|
-
cli_util.render_response(result, ctx)
|
|
691
|
-
sys.exit(2)
|
|
692
|
-
except Exception:
|
|
693
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
694
|
-
cli_util.render_response(result, ctx)
|
|
695
|
-
raise
|
|
696
|
-
else:
|
|
697
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
698
|
-
cli_util.render_response(result, ctx)
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
@ingress_gateway_route_table_group.command(name=cli_util.override('service_mesh.create_ingress_gateway_route_table.command_name', 'create'), help=u"""Creates a new IngressGatewayRouteTable. \n[Command Reference](createIngressGatewayRouteTable)""")
|
|
702
|
-
@cli_util.option('--ingress-gateway-id', required=True, help=u"""The OCID of the service mesh in which this access policy is created.""")
|
|
703
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name must be unique within the same ingress gateway and cannot be changed after creation. Avoid entering confidential information.
|
|
704
|
-
|
|
705
|
-
Example: `My unique resource name`""")
|
|
706
|
-
@cli_util.option('--route-rules', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The route rules for the ingress gateway.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
707
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
708
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
709
|
-
|
|
710
|
-
Example: `This is my new resource`""")
|
|
711
|
-
@cli_util.option('--priority', type=click.INT, help=u"""The priority of the route table. Lower value means higher priority. The routes are declared based on the priority.""")
|
|
712
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
713
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
714
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
715
|
-
@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.""")
|
|
716
|
-
@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.""")
|
|
717
|
-
@json_skeleton_utils.get_cli_json_input_option({'route-rules': {'module': 'service_mesh', 'class': 'list[IngressGatewayTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
718
|
-
@cli_util.help_option
|
|
719
|
-
@click.pass_context
|
|
720
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'route-rules': {'module': 'service_mesh', 'class': 'list[IngressGatewayTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'IngressGatewayRouteTable'})
|
|
721
|
-
@cli_util.wrap_exceptions
|
|
722
|
-
def create_ingress_gateway_route_table(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_id, name, route_rules, compartment_id, description, priority, freeform_tags, defined_tags):
|
|
723
|
-
|
|
724
|
-
kwargs = {}
|
|
725
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
726
|
-
|
|
727
|
-
_details = {}
|
|
728
|
-
_details['ingressGatewayId'] = ingress_gateway_id
|
|
729
|
-
_details['name'] = name
|
|
730
|
-
_details['routeRules'] = cli_util.parse_json_parameter("route_rules", route_rules)
|
|
731
|
-
_details['compartmentId'] = compartment_id
|
|
732
|
-
|
|
733
|
-
if description is not None:
|
|
734
|
-
_details['description'] = description
|
|
735
|
-
|
|
736
|
-
if priority is not None:
|
|
737
|
-
_details['priority'] = priority
|
|
738
|
-
|
|
739
|
-
if freeform_tags is not None:
|
|
740
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
741
|
-
|
|
742
|
-
if defined_tags is not None:
|
|
743
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
744
|
-
|
|
745
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
746
|
-
result = client.create_ingress_gateway_route_table(
|
|
747
|
-
create_ingress_gateway_route_table_details=_details,
|
|
748
|
-
**kwargs
|
|
749
|
-
)
|
|
750
|
-
if wait_for_state:
|
|
751
|
-
|
|
752
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
753
|
-
try:
|
|
754
|
-
wait_period_kwargs = {}
|
|
755
|
-
if max_wait_seconds is not None:
|
|
756
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
757
|
-
if wait_interval_seconds is not None:
|
|
758
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
759
|
-
if 'opc-work-request-id' not in result.headers:
|
|
760
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
761
|
-
cli_util.render_response(result, ctx)
|
|
762
|
-
return
|
|
763
|
-
|
|
764
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
765
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
766
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
767
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
768
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
769
|
-
cli_util.render_response(result, ctx)
|
|
770
|
-
sys.exit(2)
|
|
771
|
-
except Exception:
|
|
772
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
773
|
-
cli_util.render_response(result, ctx)
|
|
774
|
-
raise
|
|
775
|
-
else:
|
|
776
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
777
|
-
cli_util.render_response(result, ctx)
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
@mesh_group.command(name=cli_util.override('service_mesh.create_mesh.command_name', 'create'), help=u"""Creates a new Mesh. \n[Command Reference](createMesh)""")
|
|
781
|
-
@cli_util.option('--display-name', required=True, help=u"""A user-friendly name. The name does not have to be unique and can be changed after creation. Avoid entering confidential information.
|
|
782
|
-
|
|
783
|
-
Example: `My new resource`""")
|
|
784
|
-
@cli_util.option('--certificate-authorities', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The OCID of the certificate authority resource OCID to use for creating leaf certificates.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
785
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
786
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
787
|
-
|
|
788
|
-
Example: `This is my new resource`""")
|
|
789
|
-
@cli_util.option('--mtls', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
790
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
791
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
792
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
793
|
-
@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.""")
|
|
794
|
-
@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.""")
|
|
795
|
-
@json_skeleton_utils.get_cli_json_input_option({'certificate-authorities': {'module': 'service_mesh', 'class': 'list[CertificateAuthority]'}, 'mtls': {'module': 'service_mesh', 'class': 'MeshMutualTransportLayerSecurity'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
796
|
-
@cli_util.help_option
|
|
797
|
-
@click.pass_context
|
|
798
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'certificate-authorities': {'module': 'service_mesh', 'class': 'list[CertificateAuthority]'}, 'mtls': {'module': 'service_mesh', 'class': 'MeshMutualTransportLayerSecurity'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'Mesh'})
|
|
799
|
-
@cli_util.wrap_exceptions
|
|
800
|
-
def create_mesh(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, display_name, certificate_authorities, compartment_id, description, mtls, freeform_tags, defined_tags):
|
|
801
|
-
|
|
802
|
-
kwargs = {}
|
|
803
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
804
|
-
|
|
805
|
-
_details = {}
|
|
806
|
-
_details['displayName'] = display_name
|
|
807
|
-
_details['certificateAuthorities'] = cli_util.parse_json_parameter("certificate_authorities", certificate_authorities)
|
|
808
|
-
_details['compartmentId'] = compartment_id
|
|
809
|
-
|
|
810
|
-
if description is not None:
|
|
811
|
-
_details['description'] = description
|
|
812
|
-
|
|
813
|
-
if mtls is not None:
|
|
814
|
-
_details['mtls'] = cli_util.parse_json_parameter("mtls", mtls)
|
|
815
|
-
|
|
816
|
-
if freeform_tags is not None:
|
|
817
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
818
|
-
|
|
819
|
-
if defined_tags is not None:
|
|
820
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
821
|
-
|
|
822
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
823
|
-
result = client.create_mesh(
|
|
824
|
-
create_mesh_details=_details,
|
|
825
|
-
**kwargs
|
|
826
|
-
)
|
|
827
|
-
if wait_for_state:
|
|
828
|
-
|
|
829
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
830
|
-
try:
|
|
831
|
-
wait_period_kwargs = {}
|
|
832
|
-
if max_wait_seconds is not None:
|
|
833
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
834
|
-
if wait_interval_seconds is not None:
|
|
835
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
836
|
-
if 'opc-work-request-id' not in result.headers:
|
|
837
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
838
|
-
cli_util.render_response(result, ctx)
|
|
839
|
-
return
|
|
840
|
-
|
|
841
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
842
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
843
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
844
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
845
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
846
|
-
cli_util.render_response(result, ctx)
|
|
847
|
-
sys.exit(2)
|
|
848
|
-
except Exception:
|
|
849
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
850
|
-
cli_util.render_response(result, ctx)
|
|
851
|
-
raise
|
|
852
|
-
else:
|
|
853
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
854
|
-
cli_util.render_response(result, ctx)
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.create_virtual_deployment.command_name', 'create'), help=u"""Creates a new VirtualDeployment. \n[Command Reference](createVirtualDeployment)""")
|
|
858
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""The OCID of the service mesh in which this access policy is created.""")
|
|
859
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name must be unique within the same virtual service and cannot be changed after creation. Avoid entering confidential information.
|
|
860
|
-
|
|
861
|
-
Example: `My unique resource name`""")
|
|
862
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
863
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
864
|
-
|
|
865
|
-
Example: `This is my new resource`""")
|
|
866
|
-
@cli_util.option('--service-discovery', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
867
|
-
@cli_util.option('--listeners', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The listeners for the virtual deployment.
|
|
868
|
-
|
|
869
|
-
This option is a JSON list with items of type VirtualDeploymentListener. For documentation on VirtualDeploymentListener please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualDeploymentListener.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
870
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
871
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
872
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
873
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
874
|
-
@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.""")
|
|
875
|
-
@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.""")
|
|
876
|
-
@json_skeleton_utils.get_cli_json_input_option({'service-discovery': {'module': 'service_mesh', 'class': 'ServiceDiscoveryConfiguration'}, 'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
877
|
-
@cli_util.help_option
|
|
878
|
-
@click.pass_context
|
|
879
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'service-discovery': {'module': 'service_mesh', 'class': 'ServiceDiscoveryConfiguration'}, 'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'VirtualDeployment'})
|
|
880
|
-
@cli_util.wrap_exceptions
|
|
881
|
-
def create_virtual_deployment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, name, compartment_id, description, service_discovery, listeners, access_logging, freeform_tags, defined_tags):
|
|
882
|
-
|
|
883
|
-
kwargs = {}
|
|
884
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
885
|
-
|
|
886
|
-
_details = {}
|
|
887
|
-
_details['virtualServiceId'] = virtual_service_id
|
|
888
|
-
_details['name'] = name
|
|
889
|
-
_details['compartmentId'] = compartment_id
|
|
890
|
-
|
|
891
|
-
if description is not None:
|
|
892
|
-
_details['description'] = description
|
|
893
|
-
|
|
894
|
-
if service_discovery is not None:
|
|
895
|
-
_details['serviceDiscovery'] = cli_util.parse_json_parameter("service_discovery", service_discovery)
|
|
896
|
-
|
|
897
|
-
if listeners is not None:
|
|
898
|
-
_details['listeners'] = cli_util.parse_json_parameter("listeners", listeners)
|
|
899
|
-
|
|
900
|
-
if access_logging is not None:
|
|
901
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
902
|
-
|
|
903
|
-
if freeform_tags is not None:
|
|
904
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
905
|
-
|
|
906
|
-
if defined_tags is not None:
|
|
907
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
908
|
-
|
|
909
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
910
|
-
result = client.create_virtual_deployment(
|
|
911
|
-
create_virtual_deployment_details=_details,
|
|
912
|
-
**kwargs
|
|
913
|
-
)
|
|
914
|
-
if wait_for_state:
|
|
915
|
-
|
|
916
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
917
|
-
try:
|
|
918
|
-
wait_period_kwargs = {}
|
|
919
|
-
if max_wait_seconds is not None:
|
|
920
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
921
|
-
if wait_interval_seconds is not None:
|
|
922
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
923
|
-
if 'opc-work-request-id' not in result.headers:
|
|
924
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
925
|
-
cli_util.render_response(result, ctx)
|
|
926
|
-
return
|
|
927
|
-
|
|
928
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
929
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
930
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
931
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
932
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
933
|
-
cli_util.render_response(result, ctx)
|
|
934
|
-
sys.exit(2)
|
|
935
|
-
except Exception:
|
|
936
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
937
|
-
cli_util.render_response(result, ctx)
|
|
938
|
-
raise
|
|
939
|
-
else:
|
|
940
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
941
|
-
cli_util.render_response(result, ctx)
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.create_virtual_deployment_dns_service_discovery_configuration.command_name', 'create-virtual-deployment-dns-service-discovery-configuration'), help=u"""Creates a new VirtualDeployment. \n[Command Reference](createVirtualDeployment)""")
|
|
945
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""The OCID of the service mesh in which this access policy is created.""")
|
|
946
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name must be unique within the same virtual service and cannot be changed after creation. Avoid entering confidential information.
|
|
947
|
-
|
|
948
|
-
Example: `My unique resource name`""")
|
|
949
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
950
|
-
@cli_util.option('--service-discovery-hostname', required=True, help=u"""The hostname of the virtual deployments.""")
|
|
951
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
952
|
-
|
|
953
|
-
Example: `This is my new resource`""")
|
|
954
|
-
@cli_util.option('--listeners', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The listeners for the virtual deployment.
|
|
955
|
-
|
|
956
|
-
This option is a JSON list with items of type VirtualDeploymentListener. For documentation on VirtualDeploymentListener please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualDeploymentListener.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
957
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
958
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
959
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
960
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
961
|
-
@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.""")
|
|
962
|
-
@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.""")
|
|
963
|
-
@json_skeleton_utils.get_cli_json_input_option({'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
964
|
-
@cli_util.help_option
|
|
965
|
-
@click.pass_context
|
|
966
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'VirtualDeployment'})
|
|
967
|
-
@cli_util.wrap_exceptions
|
|
968
|
-
def create_virtual_deployment_dns_service_discovery_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, name, compartment_id, service_discovery_hostname, description, listeners, access_logging, freeform_tags, defined_tags):
|
|
969
|
-
|
|
970
|
-
kwargs = {}
|
|
971
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
972
|
-
|
|
973
|
-
_details = {}
|
|
974
|
-
_details['serviceDiscovery'] = {}
|
|
975
|
-
_details['virtualServiceId'] = virtual_service_id
|
|
976
|
-
_details['name'] = name
|
|
977
|
-
_details['compartmentId'] = compartment_id
|
|
978
|
-
_details['serviceDiscovery']['hostname'] = service_discovery_hostname
|
|
979
|
-
|
|
980
|
-
if description is not None:
|
|
981
|
-
_details['description'] = description
|
|
982
|
-
|
|
983
|
-
if listeners is not None:
|
|
984
|
-
_details['listeners'] = cli_util.parse_json_parameter("listeners", listeners)
|
|
985
|
-
|
|
986
|
-
if access_logging is not None:
|
|
987
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
988
|
-
|
|
989
|
-
if freeform_tags is not None:
|
|
990
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
991
|
-
|
|
992
|
-
if defined_tags is not None:
|
|
993
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
994
|
-
|
|
995
|
-
_details['serviceDiscovery']['type'] = 'DNS'
|
|
996
|
-
|
|
997
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
998
|
-
result = client.create_virtual_deployment(
|
|
999
|
-
create_virtual_deployment_details=_details,
|
|
1000
|
-
**kwargs
|
|
1001
|
-
)
|
|
1002
|
-
if wait_for_state:
|
|
1003
|
-
|
|
1004
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1005
|
-
try:
|
|
1006
|
-
wait_period_kwargs = {}
|
|
1007
|
-
if max_wait_seconds is not None:
|
|
1008
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1009
|
-
if wait_interval_seconds is not None:
|
|
1010
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1011
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1012
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1013
|
-
cli_util.render_response(result, ctx)
|
|
1014
|
-
return
|
|
1015
|
-
|
|
1016
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1017
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1018
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1019
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1020
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1021
|
-
cli_util.render_response(result, ctx)
|
|
1022
|
-
sys.exit(2)
|
|
1023
|
-
except Exception:
|
|
1024
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1025
|
-
cli_util.render_response(result, ctx)
|
|
1026
|
-
raise
|
|
1027
|
-
else:
|
|
1028
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1029
|
-
cli_util.render_response(result, ctx)
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.create_virtual_deployment_disabled_service_discovery_configuration.command_name', 'create-virtual-deployment-disabled-service-discovery-configuration'), help=u"""Creates a new VirtualDeployment. \n[Command Reference](createVirtualDeployment)""")
|
|
1033
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""The OCID of the service mesh in which this access policy is created.""")
|
|
1034
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name must be unique within the same virtual service and cannot be changed after creation. Avoid entering confidential information.
|
|
1035
|
-
|
|
1036
|
-
Example: `My unique resource name`""")
|
|
1037
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
1038
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
1039
|
-
|
|
1040
|
-
Example: `This is my new resource`""")
|
|
1041
|
-
@cli_util.option('--listeners', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The listeners for the virtual deployment.
|
|
1042
|
-
|
|
1043
|
-
This option is a JSON list with items of type VirtualDeploymentListener. For documentation on VirtualDeploymentListener please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualDeploymentListener.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1044
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1045
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1046
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1047
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1048
|
-
@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.""")
|
|
1049
|
-
@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.""")
|
|
1050
|
-
@json_skeleton_utils.get_cli_json_input_option({'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
1051
|
-
@cli_util.help_option
|
|
1052
|
-
@click.pass_context
|
|
1053
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'VirtualDeployment'})
|
|
1054
|
-
@cli_util.wrap_exceptions
|
|
1055
|
-
def create_virtual_deployment_disabled_service_discovery_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, name, compartment_id, description, listeners, access_logging, freeform_tags, defined_tags):
|
|
1056
|
-
|
|
1057
|
-
kwargs = {}
|
|
1058
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1059
|
-
|
|
1060
|
-
_details = {}
|
|
1061
|
-
_details['serviceDiscovery'] = {}
|
|
1062
|
-
_details['virtualServiceId'] = virtual_service_id
|
|
1063
|
-
_details['name'] = name
|
|
1064
|
-
_details['compartmentId'] = compartment_id
|
|
1065
|
-
|
|
1066
|
-
if description is not None:
|
|
1067
|
-
_details['description'] = description
|
|
1068
|
-
|
|
1069
|
-
if listeners is not None:
|
|
1070
|
-
_details['listeners'] = cli_util.parse_json_parameter("listeners", listeners)
|
|
1071
|
-
|
|
1072
|
-
if access_logging is not None:
|
|
1073
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
1074
|
-
|
|
1075
|
-
if freeform_tags is not None:
|
|
1076
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
1077
|
-
|
|
1078
|
-
if defined_tags is not None:
|
|
1079
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
1080
|
-
|
|
1081
|
-
_details['serviceDiscovery']['type'] = 'DISABLED'
|
|
1082
|
-
|
|
1083
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1084
|
-
result = client.create_virtual_deployment(
|
|
1085
|
-
create_virtual_deployment_details=_details,
|
|
1086
|
-
**kwargs
|
|
1087
|
-
)
|
|
1088
|
-
if wait_for_state:
|
|
1089
|
-
|
|
1090
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1091
|
-
try:
|
|
1092
|
-
wait_period_kwargs = {}
|
|
1093
|
-
if max_wait_seconds is not None:
|
|
1094
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1095
|
-
if wait_interval_seconds is not None:
|
|
1096
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1097
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1098
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1099
|
-
cli_util.render_response(result, ctx)
|
|
1100
|
-
return
|
|
1101
|
-
|
|
1102
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1103
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1104
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1105
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1106
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1107
|
-
cli_util.render_response(result, ctx)
|
|
1108
|
-
sys.exit(2)
|
|
1109
|
-
except Exception:
|
|
1110
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1111
|
-
cli_util.render_response(result, ctx)
|
|
1112
|
-
raise
|
|
1113
|
-
else:
|
|
1114
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1115
|
-
cli_util.render_response(result, ctx)
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
@virtual_service_group.command(name=cli_util.override('service_mesh.create_virtual_service.command_name', 'create'), help=u"""Creates a new VirtualService. \n[Command Reference](createVirtualService)""")
|
|
1119
|
-
@cli_util.option('--mesh-id', required=True, help=u"""The OCID of the service mesh in which this virtual service is created.""")
|
|
1120
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information.
|
|
1121
|
-
|
|
1122
|
-
Example: `My unique resource name`""")
|
|
1123
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
1124
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
1125
|
-
|
|
1126
|
-
Example: `This is my new resource`""")
|
|
1127
|
-
@cli_util.option('--default-routing-policy', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1128
|
-
@cli_util.option('--hosts', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are \"www.example.com\", \"*.example.com\", \"*.com\". Can be omitted if the virtual service will only have TCP virtual deployments.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1129
|
-
@cli_util.option('--mtls', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1130
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1131
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1132
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1133
|
-
@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.""")
|
|
1134
|
-
@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.""")
|
|
1135
|
-
@json_skeleton_utils.get_cli_json_input_option({'default-routing-policy': {'module': 'service_mesh', 'class': 'DefaultVirtualServiceRoutingPolicy'}, 'hosts': {'module': 'service_mesh', 'class': 'list[string]'}, 'mtls': {'module': 'service_mesh', 'class': 'VirtualServiceMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
1136
|
-
@cli_util.help_option
|
|
1137
|
-
@click.pass_context
|
|
1138
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'default-routing-policy': {'module': 'service_mesh', 'class': 'DefaultVirtualServiceRoutingPolicy'}, 'hosts': {'module': 'service_mesh', 'class': 'list[string]'}, 'mtls': {'module': 'service_mesh', 'class': 'VirtualServiceMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'VirtualService'})
|
|
1139
|
-
@cli_util.wrap_exceptions
|
|
1140
|
-
def create_virtual_service(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, mesh_id, name, compartment_id, description, default_routing_policy, hosts, mtls, freeform_tags, defined_tags):
|
|
1141
|
-
|
|
1142
|
-
kwargs = {}
|
|
1143
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1144
|
-
|
|
1145
|
-
_details = {}
|
|
1146
|
-
_details['meshId'] = mesh_id
|
|
1147
|
-
_details['name'] = name
|
|
1148
|
-
_details['compartmentId'] = compartment_id
|
|
1149
|
-
|
|
1150
|
-
if description is not None:
|
|
1151
|
-
_details['description'] = description
|
|
1152
|
-
|
|
1153
|
-
if default_routing_policy is not None:
|
|
1154
|
-
_details['defaultRoutingPolicy'] = cli_util.parse_json_parameter("default_routing_policy", default_routing_policy)
|
|
1155
|
-
|
|
1156
|
-
if hosts is not None:
|
|
1157
|
-
_details['hosts'] = cli_util.parse_json_parameter("hosts", hosts)
|
|
1158
|
-
|
|
1159
|
-
if mtls is not None:
|
|
1160
|
-
_details['mtls'] = cli_util.parse_json_parameter("mtls", mtls)
|
|
1161
|
-
|
|
1162
|
-
if freeform_tags is not None:
|
|
1163
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
1164
|
-
|
|
1165
|
-
if defined_tags is not None:
|
|
1166
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
1167
|
-
|
|
1168
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1169
|
-
result = client.create_virtual_service(
|
|
1170
|
-
create_virtual_service_details=_details,
|
|
1171
|
-
**kwargs
|
|
1172
|
-
)
|
|
1173
|
-
if wait_for_state:
|
|
1174
|
-
|
|
1175
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1176
|
-
try:
|
|
1177
|
-
wait_period_kwargs = {}
|
|
1178
|
-
if max_wait_seconds is not None:
|
|
1179
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1180
|
-
if wait_interval_seconds is not None:
|
|
1181
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1182
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1183
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1184
|
-
cli_util.render_response(result, ctx)
|
|
1185
|
-
return
|
|
1186
|
-
|
|
1187
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1188
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1189
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1190
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1191
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1192
|
-
cli_util.render_response(result, ctx)
|
|
1193
|
-
sys.exit(2)
|
|
1194
|
-
except Exception:
|
|
1195
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1196
|
-
cli_util.render_response(result, ctx)
|
|
1197
|
-
raise
|
|
1198
|
-
else:
|
|
1199
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1200
|
-
cli_util.render_response(result, ctx)
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
@virtual_service_route_table_group.command(name=cli_util.override('service_mesh.create_virtual_service_route_table.command_name', 'create'), help=u"""Creates a new VirtualServiceRouteTable. \n[Command Reference](createVirtualServiceRouteTable)""")
|
|
1204
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""The OCID of the service mesh in which this access policy is created.""")
|
|
1205
|
-
@cli_util.option('--name', required=True, help=u"""A user-friendly name. The name must be unique within the same virtual service and cannot be changed after creation. Avoid entering confidential information.
|
|
1206
|
-
|
|
1207
|
-
Example: `My unique resource name`""")
|
|
1208
|
-
@cli_util.option('--route-rules', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""The route rules for the virtual service.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1209
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment.""")
|
|
1210
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
1211
|
-
|
|
1212
|
-
Example: `This is my new resource`""")
|
|
1213
|
-
@cli_util.option('--priority', type=click.INT, help=u"""The priority of the route table. Lower value means higher priority. The routes are declared based on the priority.""")
|
|
1214
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1215
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
1216
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1217
|
-
@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.""")
|
|
1218
|
-
@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.""")
|
|
1219
|
-
@json_skeleton_utils.get_cli_json_input_option({'route-rules': {'module': 'service_mesh', 'class': 'list[VirtualServiceTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
1220
|
-
@cli_util.help_option
|
|
1221
|
-
@click.pass_context
|
|
1222
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'route-rules': {'module': 'service_mesh', 'class': 'list[VirtualServiceTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'service_mesh', 'class': 'VirtualServiceRouteTable'})
|
|
1223
|
-
@cli_util.wrap_exceptions
|
|
1224
|
-
def create_virtual_service_route_table(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, name, route_rules, compartment_id, description, priority, freeform_tags, defined_tags):
|
|
1225
|
-
|
|
1226
|
-
kwargs = {}
|
|
1227
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1228
|
-
|
|
1229
|
-
_details = {}
|
|
1230
|
-
_details['virtualServiceId'] = virtual_service_id
|
|
1231
|
-
_details['name'] = name
|
|
1232
|
-
_details['routeRules'] = cli_util.parse_json_parameter("route_rules", route_rules)
|
|
1233
|
-
_details['compartmentId'] = compartment_id
|
|
1234
|
-
|
|
1235
|
-
if description is not None:
|
|
1236
|
-
_details['description'] = description
|
|
1237
|
-
|
|
1238
|
-
if priority is not None:
|
|
1239
|
-
_details['priority'] = priority
|
|
1240
|
-
|
|
1241
|
-
if freeform_tags is not None:
|
|
1242
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
1243
|
-
|
|
1244
|
-
if defined_tags is not None:
|
|
1245
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
1246
|
-
|
|
1247
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1248
|
-
result = client.create_virtual_service_route_table(
|
|
1249
|
-
create_virtual_service_route_table_details=_details,
|
|
1250
|
-
**kwargs
|
|
1251
|
-
)
|
|
1252
|
-
if wait_for_state:
|
|
1253
|
-
|
|
1254
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1255
|
-
try:
|
|
1256
|
-
wait_period_kwargs = {}
|
|
1257
|
-
if max_wait_seconds is not None:
|
|
1258
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1259
|
-
if wait_interval_seconds is not None:
|
|
1260
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1261
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1262
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1263
|
-
cli_util.render_response(result, ctx)
|
|
1264
|
-
return
|
|
1265
|
-
|
|
1266
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1267
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1268
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1269
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1270
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1271
|
-
cli_util.render_response(result, ctx)
|
|
1272
|
-
sys.exit(2)
|
|
1273
|
-
except Exception:
|
|
1274
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1275
|
-
cli_util.render_response(result, ctx)
|
|
1276
|
-
raise
|
|
1277
|
-
else:
|
|
1278
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1279
|
-
cli_util.render_response(result, ctx)
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
@access_policy_group.command(name=cli_util.override('service_mesh.delete_access_policy.command_name', 'delete'), help=u"""Deletes an AccessPolicy resource by identifier. \n[Command Reference](deleteAccessPolicy)""")
|
|
1283
|
-
@cli_util.option('--access-policy-id', required=True, help=u"""Unique AccessPolicy identifier.""")
|
|
1284
|
-
@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.""")
|
|
1285
|
-
@cli_util.confirm_delete_option
|
|
1286
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1287
|
-
@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.""")
|
|
1288
|
-
@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.""")
|
|
1289
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1290
|
-
@cli_util.help_option
|
|
1291
|
-
@click.pass_context
|
|
1292
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1293
|
-
@cli_util.wrap_exceptions
|
|
1294
|
-
def delete_access_policy(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, access_policy_id, if_match):
|
|
1295
|
-
|
|
1296
|
-
if isinstance(access_policy_id, six.string_types) and len(access_policy_id.strip()) == 0:
|
|
1297
|
-
raise click.UsageError('Parameter --access-policy-id cannot be whitespace or empty string')
|
|
1298
|
-
|
|
1299
|
-
kwargs = {}
|
|
1300
|
-
if if_match is not None:
|
|
1301
|
-
kwargs['if_match'] = if_match
|
|
1302
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1303
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1304
|
-
result = client.delete_access_policy(
|
|
1305
|
-
access_policy_id=access_policy_id,
|
|
1306
|
-
**kwargs
|
|
1307
|
-
)
|
|
1308
|
-
if wait_for_state:
|
|
1309
|
-
|
|
1310
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1311
|
-
try:
|
|
1312
|
-
wait_period_kwargs = {}
|
|
1313
|
-
if max_wait_seconds is not None:
|
|
1314
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1315
|
-
if wait_interval_seconds is not None:
|
|
1316
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1317
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1318
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1319
|
-
cli_util.render_response(result, ctx)
|
|
1320
|
-
return
|
|
1321
|
-
|
|
1322
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1323
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1324
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1325
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1326
|
-
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)
|
|
1327
|
-
cli_util.render_response(result, ctx)
|
|
1328
|
-
sys.exit(2)
|
|
1329
|
-
except Exception:
|
|
1330
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1331
|
-
cli_util.render_response(result, ctx)
|
|
1332
|
-
raise
|
|
1333
|
-
else:
|
|
1334
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1335
|
-
cli_util.render_response(result, ctx)
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
@ingress_gateway_group.command(name=cli_util.override('service_mesh.delete_ingress_gateway.command_name', 'delete'), help=u"""Deletes an IngressGateway resource by identifier. \n[Command Reference](deleteIngressGateway)""")
|
|
1339
|
-
@cli_util.option('--ingress-gateway-id', required=True, help=u"""Unique IngressGateway identifier.""")
|
|
1340
|
-
@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.""")
|
|
1341
|
-
@cli_util.confirm_delete_option
|
|
1342
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1343
|
-
@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.""")
|
|
1344
|
-
@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.""")
|
|
1345
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1346
|
-
@cli_util.help_option
|
|
1347
|
-
@click.pass_context
|
|
1348
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1349
|
-
@cli_util.wrap_exceptions
|
|
1350
|
-
def delete_ingress_gateway(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_id, if_match):
|
|
1351
|
-
|
|
1352
|
-
if isinstance(ingress_gateway_id, six.string_types) and len(ingress_gateway_id.strip()) == 0:
|
|
1353
|
-
raise click.UsageError('Parameter --ingress-gateway-id cannot be whitespace or empty string')
|
|
1354
|
-
|
|
1355
|
-
kwargs = {}
|
|
1356
|
-
if if_match is not None:
|
|
1357
|
-
kwargs['if_match'] = if_match
|
|
1358
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1359
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1360
|
-
result = client.delete_ingress_gateway(
|
|
1361
|
-
ingress_gateway_id=ingress_gateway_id,
|
|
1362
|
-
**kwargs
|
|
1363
|
-
)
|
|
1364
|
-
if wait_for_state:
|
|
1365
|
-
|
|
1366
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1367
|
-
try:
|
|
1368
|
-
wait_period_kwargs = {}
|
|
1369
|
-
if max_wait_seconds is not None:
|
|
1370
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1371
|
-
if wait_interval_seconds is not None:
|
|
1372
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1373
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1374
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1375
|
-
cli_util.render_response(result, ctx)
|
|
1376
|
-
return
|
|
1377
|
-
|
|
1378
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1379
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1380
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1381
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1382
|
-
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)
|
|
1383
|
-
cli_util.render_response(result, ctx)
|
|
1384
|
-
sys.exit(2)
|
|
1385
|
-
except Exception:
|
|
1386
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1387
|
-
cli_util.render_response(result, ctx)
|
|
1388
|
-
raise
|
|
1389
|
-
else:
|
|
1390
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1391
|
-
cli_util.render_response(result, ctx)
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
@ingress_gateway_route_table_group.command(name=cli_util.override('service_mesh.delete_ingress_gateway_route_table.command_name', 'delete'), help=u"""Deletes a IngressGatewayRouteTable resource by identifier. \n[Command Reference](deleteIngressGatewayRouteTable)""")
|
|
1395
|
-
@cli_util.option('--ingress-gateway-route-table-id', required=True, help=u"""Unique IngressGatewayRouteTable identifier.""")
|
|
1396
|
-
@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.""")
|
|
1397
|
-
@cli_util.confirm_delete_option
|
|
1398
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1399
|
-
@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.""")
|
|
1400
|
-
@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.""")
|
|
1401
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1402
|
-
@cli_util.help_option
|
|
1403
|
-
@click.pass_context
|
|
1404
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1405
|
-
@cli_util.wrap_exceptions
|
|
1406
|
-
def delete_ingress_gateway_route_table(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_route_table_id, if_match):
|
|
1407
|
-
|
|
1408
|
-
if isinstance(ingress_gateway_route_table_id, six.string_types) and len(ingress_gateway_route_table_id.strip()) == 0:
|
|
1409
|
-
raise click.UsageError('Parameter --ingress-gateway-route-table-id cannot be whitespace or empty string')
|
|
1410
|
-
|
|
1411
|
-
kwargs = {}
|
|
1412
|
-
if if_match is not None:
|
|
1413
|
-
kwargs['if_match'] = if_match
|
|
1414
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1415
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1416
|
-
result = client.delete_ingress_gateway_route_table(
|
|
1417
|
-
ingress_gateway_route_table_id=ingress_gateway_route_table_id,
|
|
1418
|
-
**kwargs
|
|
1419
|
-
)
|
|
1420
|
-
if wait_for_state:
|
|
1421
|
-
|
|
1422
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1423
|
-
try:
|
|
1424
|
-
wait_period_kwargs = {}
|
|
1425
|
-
if max_wait_seconds is not None:
|
|
1426
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1427
|
-
if wait_interval_seconds is not None:
|
|
1428
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1429
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1430
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1431
|
-
cli_util.render_response(result, ctx)
|
|
1432
|
-
return
|
|
1433
|
-
|
|
1434
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1435
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1436
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1437
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1438
|
-
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)
|
|
1439
|
-
cli_util.render_response(result, ctx)
|
|
1440
|
-
sys.exit(2)
|
|
1441
|
-
except Exception:
|
|
1442
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1443
|
-
cli_util.render_response(result, ctx)
|
|
1444
|
-
raise
|
|
1445
|
-
else:
|
|
1446
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1447
|
-
cli_util.render_response(result, ctx)
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
@mesh_group.command(name=cli_util.override('service_mesh.delete_mesh.command_name', 'delete'), help=u"""Deletes a Mesh resource by identifier. \n[Command Reference](deleteMesh)""")
|
|
1451
|
-
@cli_util.option('--mesh-id', required=True, help=u"""Unique Mesh identifier.""")
|
|
1452
|
-
@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.""")
|
|
1453
|
-
@cli_util.confirm_delete_option
|
|
1454
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1455
|
-
@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.""")
|
|
1456
|
-
@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.""")
|
|
1457
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1458
|
-
@cli_util.help_option
|
|
1459
|
-
@click.pass_context
|
|
1460
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1461
|
-
@cli_util.wrap_exceptions
|
|
1462
|
-
def delete_mesh(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, mesh_id, if_match):
|
|
1463
|
-
|
|
1464
|
-
if isinstance(mesh_id, six.string_types) and len(mesh_id.strip()) == 0:
|
|
1465
|
-
raise click.UsageError('Parameter --mesh-id cannot be whitespace or empty string')
|
|
1466
|
-
|
|
1467
|
-
kwargs = {}
|
|
1468
|
-
if if_match is not None:
|
|
1469
|
-
kwargs['if_match'] = if_match
|
|
1470
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1471
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1472
|
-
result = client.delete_mesh(
|
|
1473
|
-
mesh_id=mesh_id,
|
|
1474
|
-
**kwargs
|
|
1475
|
-
)
|
|
1476
|
-
if wait_for_state:
|
|
1477
|
-
|
|
1478
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1479
|
-
try:
|
|
1480
|
-
wait_period_kwargs = {}
|
|
1481
|
-
if max_wait_seconds is not None:
|
|
1482
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1483
|
-
if wait_interval_seconds is not None:
|
|
1484
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1485
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1486
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1487
|
-
cli_util.render_response(result, ctx)
|
|
1488
|
-
return
|
|
1489
|
-
|
|
1490
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1491
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1492
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1493
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1494
|
-
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)
|
|
1495
|
-
cli_util.render_response(result, ctx)
|
|
1496
|
-
sys.exit(2)
|
|
1497
|
-
except Exception:
|
|
1498
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1499
|
-
cli_util.render_response(result, ctx)
|
|
1500
|
-
raise
|
|
1501
|
-
else:
|
|
1502
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1503
|
-
cli_util.render_response(result, ctx)
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.delete_virtual_deployment.command_name', 'delete'), help=u"""Deletes a VirtualDeployment resource by identifier. \n[Command Reference](deleteVirtualDeployment)""")
|
|
1507
|
-
@cli_util.option('--virtual-deployment-id', required=True, help=u"""Unique VirtualDeployment identifier.""")
|
|
1508
|
-
@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.""")
|
|
1509
|
-
@cli_util.confirm_delete_option
|
|
1510
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1511
|
-
@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.""")
|
|
1512
|
-
@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.""")
|
|
1513
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1514
|
-
@cli_util.help_option
|
|
1515
|
-
@click.pass_context
|
|
1516
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1517
|
-
@cli_util.wrap_exceptions
|
|
1518
|
-
def delete_virtual_deployment(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_deployment_id, if_match):
|
|
1519
|
-
|
|
1520
|
-
if isinstance(virtual_deployment_id, six.string_types) and len(virtual_deployment_id.strip()) == 0:
|
|
1521
|
-
raise click.UsageError('Parameter --virtual-deployment-id cannot be whitespace or empty string')
|
|
1522
|
-
|
|
1523
|
-
kwargs = {}
|
|
1524
|
-
if if_match is not None:
|
|
1525
|
-
kwargs['if_match'] = if_match
|
|
1526
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1527
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1528
|
-
result = client.delete_virtual_deployment(
|
|
1529
|
-
virtual_deployment_id=virtual_deployment_id,
|
|
1530
|
-
**kwargs
|
|
1531
|
-
)
|
|
1532
|
-
if wait_for_state:
|
|
1533
|
-
|
|
1534
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1535
|
-
try:
|
|
1536
|
-
wait_period_kwargs = {}
|
|
1537
|
-
if max_wait_seconds is not None:
|
|
1538
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1539
|
-
if wait_interval_seconds is not None:
|
|
1540
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1541
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1542
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1543
|
-
cli_util.render_response(result, ctx)
|
|
1544
|
-
return
|
|
1545
|
-
|
|
1546
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1547
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1548
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1549
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1550
|
-
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)
|
|
1551
|
-
cli_util.render_response(result, ctx)
|
|
1552
|
-
sys.exit(2)
|
|
1553
|
-
except Exception:
|
|
1554
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1555
|
-
cli_util.render_response(result, ctx)
|
|
1556
|
-
raise
|
|
1557
|
-
else:
|
|
1558
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1559
|
-
cli_util.render_response(result, ctx)
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
@virtual_service_group.command(name=cli_util.override('service_mesh.delete_virtual_service.command_name', 'delete'), help=u"""Deletes a VirtualService resource by identifier \n[Command Reference](deleteVirtualService)""")
|
|
1563
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""Unique VirtualService identifier.""")
|
|
1564
|
-
@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.""")
|
|
1565
|
-
@cli_util.confirm_delete_option
|
|
1566
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1567
|
-
@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.""")
|
|
1568
|
-
@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.""")
|
|
1569
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1570
|
-
@cli_util.help_option
|
|
1571
|
-
@click.pass_context
|
|
1572
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1573
|
-
@cli_util.wrap_exceptions
|
|
1574
|
-
def delete_virtual_service(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, if_match):
|
|
1575
|
-
|
|
1576
|
-
if isinstance(virtual_service_id, six.string_types) and len(virtual_service_id.strip()) == 0:
|
|
1577
|
-
raise click.UsageError('Parameter --virtual-service-id cannot be whitespace or empty string')
|
|
1578
|
-
|
|
1579
|
-
kwargs = {}
|
|
1580
|
-
if if_match is not None:
|
|
1581
|
-
kwargs['if_match'] = if_match
|
|
1582
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1583
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1584
|
-
result = client.delete_virtual_service(
|
|
1585
|
-
virtual_service_id=virtual_service_id,
|
|
1586
|
-
**kwargs
|
|
1587
|
-
)
|
|
1588
|
-
if wait_for_state:
|
|
1589
|
-
|
|
1590
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1591
|
-
try:
|
|
1592
|
-
wait_period_kwargs = {}
|
|
1593
|
-
if max_wait_seconds is not None:
|
|
1594
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1595
|
-
if wait_interval_seconds is not None:
|
|
1596
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1597
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1598
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1599
|
-
cli_util.render_response(result, ctx)
|
|
1600
|
-
return
|
|
1601
|
-
|
|
1602
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1603
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1604
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1605
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1606
|
-
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)
|
|
1607
|
-
cli_util.render_response(result, ctx)
|
|
1608
|
-
sys.exit(2)
|
|
1609
|
-
except Exception:
|
|
1610
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1611
|
-
cli_util.render_response(result, ctx)
|
|
1612
|
-
raise
|
|
1613
|
-
else:
|
|
1614
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1615
|
-
cli_util.render_response(result, ctx)
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
@virtual_service_route_table_group.command(name=cli_util.override('service_mesh.delete_virtual_service_route_table.command_name', 'delete'), help=u"""Deletes a VirtualServiceRouteTable resource by identifier. \n[Command Reference](deleteVirtualServiceRouteTable)""")
|
|
1619
|
-
@cli_util.option('--virtual-service-route-table-id', required=True, help=u"""Unique VirtualServiceRouteTable identifier.""")
|
|
1620
|
-
@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.""")
|
|
1621
|
-
@cli_util.confirm_delete_option
|
|
1622
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
1623
|
-
@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.""")
|
|
1624
|
-
@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.""")
|
|
1625
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1626
|
-
@cli_util.help_option
|
|
1627
|
-
@click.pass_context
|
|
1628
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1629
|
-
@cli_util.wrap_exceptions
|
|
1630
|
-
def delete_virtual_service_route_table(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_route_table_id, if_match):
|
|
1631
|
-
|
|
1632
|
-
if isinstance(virtual_service_route_table_id, six.string_types) and len(virtual_service_route_table_id.strip()) == 0:
|
|
1633
|
-
raise click.UsageError('Parameter --virtual-service-route-table-id cannot be whitespace or empty string')
|
|
1634
|
-
|
|
1635
|
-
kwargs = {}
|
|
1636
|
-
if if_match is not None:
|
|
1637
|
-
kwargs['if_match'] = if_match
|
|
1638
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1639
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1640
|
-
result = client.delete_virtual_service_route_table(
|
|
1641
|
-
virtual_service_route_table_id=virtual_service_route_table_id,
|
|
1642
|
-
**kwargs
|
|
1643
|
-
)
|
|
1644
|
-
if wait_for_state:
|
|
1645
|
-
|
|
1646
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1647
|
-
try:
|
|
1648
|
-
wait_period_kwargs = {}
|
|
1649
|
-
if max_wait_seconds is not None:
|
|
1650
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1651
|
-
if wait_interval_seconds is not None:
|
|
1652
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1653
|
-
if 'opc-work-request-id' not in result.headers:
|
|
1654
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1655
|
-
cli_util.render_response(result, ctx)
|
|
1656
|
-
return
|
|
1657
|
-
|
|
1658
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1659
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1660
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1661
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1662
|
-
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)
|
|
1663
|
-
cli_util.render_response(result, ctx)
|
|
1664
|
-
sys.exit(2)
|
|
1665
|
-
except Exception:
|
|
1666
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1667
|
-
cli_util.render_response(result, ctx)
|
|
1668
|
-
raise
|
|
1669
|
-
else:
|
|
1670
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1671
|
-
cli_util.render_response(result, ctx)
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
@access_policy_group.command(name=cli_util.override('service_mesh.get_access_policy.command_name', 'get'), help=u"""Get an AccessPolicy by identifier. \n[Command Reference](getAccessPolicy)""")
|
|
1675
|
-
@cli_util.option('--access-policy-id', required=True, help=u"""Unique AccessPolicy identifier.""")
|
|
1676
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1677
|
-
@cli_util.help_option
|
|
1678
|
-
@click.pass_context
|
|
1679
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'AccessPolicy'})
|
|
1680
|
-
@cli_util.wrap_exceptions
|
|
1681
|
-
def get_access_policy(ctx, from_json, access_policy_id):
|
|
1682
|
-
|
|
1683
|
-
if isinstance(access_policy_id, six.string_types) and len(access_policy_id.strip()) == 0:
|
|
1684
|
-
raise click.UsageError('Parameter --access-policy-id cannot be whitespace or empty string')
|
|
1685
|
-
|
|
1686
|
-
kwargs = {}
|
|
1687
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1688
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1689
|
-
result = client.get_access_policy(
|
|
1690
|
-
access_policy_id=access_policy_id,
|
|
1691
|
-
**kwargs
|
|
1692
|
-
)
|
|
1693
|
-
cli_util.render_response(result, ctx)
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
@ingress_gateway_group.command(name=cli_util.override('service_mesh.get_ingress_gateway.command_name', 'get'), help=u"""Gets an IngressGateway by identifier. \n[Command Reference](getIngressGateway)""")
|
|
1697
|
-
@cli_util.option('--ingress-gateway-id', required=True, help=u"""Unique IngressGateway identifier.""")
|
|
1698
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1699
|
-
@cli_util.help_option
|
|
1700
|
-
@click.pass_context
|
|
1701
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'IngressGateway'})
|
|
1702
|
-
@cli_util.wrap_exceptions
|
|
1703
|
-
def get_ingress_gateway(ctx, from_json, ingress_gateway_id):
|
|
1704
|
-
|
|
1705
|
-
if isinstance(ingress_gateway_id, six.string_types) and len(ingress_gateway_id.strip()) == 0:
|
|
1706
|
-
raise click.UsageError('Parameter --ingress-gateway-id cannot be whitespace or empty string')
|
|
1707
|
-
|
|
1708
|
-
kwargs = {}
|
|
1709
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1710
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1711
|
-
result = client.get_ingress_gateway(
|
|
1712
|
-
ingress_gateway_id=ingress_gateway_id,
|
|
1713
|
-
**kwargs
|
|
1714
|
-
)
|
|
1715
|
-
cli_util.render_response(result, ctx)
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
@ingress_gateway_route_table_group.command(name=cli_util.override('service_mesh.get_ingress_gateway_route_table.command_name', 'get'), help=u"""Gets a IngressGatewayRouteTable by identifier. \n[Command Reference](getIngressGatewayRouteTable)""")
|
|
1719
|
-
@cli_util.option('--ingress-gateway-route-table-id', required=True, help=u"""Unique IngressGatewayRouteTable identifier.""")
|
|
1720
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1721
|
-
@cli_util.help_option
|
|
1722
|
-
@click.pass_context
|
|
1723
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'IngressGatewayRouteTable'})
|
|
1724
|
-
@cli_util.wrap_exceptions
|
|
1725
|
-
def get_ingress_gateway_route_table(ctx, from_json, ingress_gateway_route_table_id):
|
|
1726
|
-
|
|
1727
|
-
if isinstance(ingress_gateway_route_table_id, six.string_types) and len(ingress_gateway_route_table_id.strip()) == 0:
|
|
1728
|
-
raise click.UsageError('Parameter --ingress-gateway-route-table-id cannot be whitespace or empty string')
|
|
1729
|
-
|
|
1730
|
-
kwargs = {}
|
|
1731
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1732
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1733
|
-
result = client.get_ingress_gateway_route_table(
|
|
1734
|
-
ingress_gateway_route_table_id=ingress_gateway_route_table_id,
|
|
1735
|
-
**kwargs
|
|
1736
|
-
)
|
|
1737
|
-
cli_util.render_response(result, ctx)
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
@mesh_group.command(name=cli_util.override('service_mesh.get_mesh.command_name', 'get'), help=u"""Gets a Mesh by identifier. \n[Command Reference](getMesh)""")
|
|
1741
|
-
@cli_util.option('--mesh-id', required=True, help=u"""Unique Mesh identifier.""")
|
|
1742
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1743
|
-
@cli_util.help_option
|
|
1744
|
-
@click.pass_context
|
|
1745
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'Mesh'})
|
|
1746
|
-
@cli_util.wrap_exceptions
|
|
1747
|
-
def get_mesh(ctx, from_json, mesh_id):
|
|
1748
|
-
|
|
1749
|
-
if isinstance(mesh_id, six.string_types) and len(mesh_id.strip()) == 0:
|
|
1750
|
-
raise click.UsageError('Parameter --mesh-id cannot be whitespace or empty string')
|
|
1751
|
-
|
|
1752
|
-
kwargs = {}
|
|
1753
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1754
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1755
|
-
result = client.get_mesh(
|
|
1756
|
-
mesh_id=mesh_id,
|
|
1757
|
-
**kwargs
|
|
1758
|
-
)
|
|
1759
|
-
cli_util.render_response(result, ctx)
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
@proxy_details_group.command(name=cli_util.override('service_mesh.get_proxy_details.command_name', 'get'), help=u"""Returns the attributes of the Proxy such as proxy image version. \n[Command Reference](getProxyDetails)""")
|
|
1763
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1764
|
-
@cli_util.help_option
|
|
1765
|
-
@click.pass_context
|
|
1766
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'ProxyDetails'})
|
|
1767
|
-
@cli_util.wrap_exceptions
|
|
1768
|
-
def get_proxy_details(ctx, from_json, ):
|
|
1769
|
-
|
|
1770
|
-
kwargs = {}
|
|
1771
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1772
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1773
|
-
result = client.get_proxy_details(
|
|
1774
|
-
**kwargs
|
|
1775
|
-
)
|
|
1776
|
-
cli_util.render_response(result, ctx)
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.get_virtual_deployment.command_name', 'get'), help=u"""Gets a VirtualDeployment by identifier. \n[Command Reference](getVirtualDeployment)""")
|
|
1780
|
-
@cli_util.option('--virtual-deployment-id', required=True, help=u"""Unique VirtualDeployment identifier.""")
|
|
1781
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1782
|
-
@cli_util.help_option
|
|
1783
|
-
@click.pass_context
|
|
1784
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'VirtualDeployment'})
|
|
1785
|
-
@cli_util.wrap_exceptions
|
|
1786
|
-
def get_virtual_deployment(ctx, from_json, virtual_deployment_id):
|
|
1787
|
-
|
|
1788
|
-
if isinstance(virtual_deployment_id, six.string_types) and len(virtual_deployment_id.strip()) == 0:
|
|
1789
|
-
raise click.UsageError('Parameter --virtual-deployment-id cannot be whitespace or empty string')
|
|
1790
|
-
|
|
1791
|
-
kwargs = {}
|
|
1792
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1793
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1794
|
-
result = client.get_virtual_deployment(
|
|
1795
|
-
virtual_deployment_id=virtual_deployment_id,
|
|
1796
|
-
**kwargs
|
|
1797
|
-
)
|
|
1798
|
-
cli_util.render_response(result, ctx)
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
@virtual_service_group.command(name=cli_util.override('service_mesh.get_virtual_service.command_name', 'get'), help=u"""Gets a VirtualService by identifier. \n[Command Reference](getVirtualService)""")
|
|
1802
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""Unique VirtualService identifier.""")
|
|
1803
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1804
|
-
@cli_util.help_option
|
|
1805
|
-
@click.pass_context
|
|
1806
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'VirtualService'})
|
|
1807
|
-
@cli_util.wrap_exceptions
|
|
1808
|
-
def get_virtual_service(ctx, from_json, virtual_service_id):
|
|
1809
|
-
|
|
1810
|
-
if isinstance(virtual_service_id, six.string_types) and len(virtual_service_id.strip()) == 0:
|
|
1811
|
-
raise click.UsageError('Parameter --virtual-service-id cannot be whitespace or empty string')
|
|
1812
|
-
|
|
1813
|
-
kwargs = {}
|
|
1814
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1815
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1816
|
-
result = client.get_virtual_service(
|
|
1817
|
-
virtual_service_id=virtual_service_id,
|
|
1818
|
-
**kwargs
|
|
1819
|
-
)
|
|
1820
|
-
cli_util.render_response(result, ctx)
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
@virtual_service_route_table_group.command(name=cli_util.override('service_mesh.get_virtual_service_route_table.command_name', 'get'), help=u"""Gets a VirtualServiceRouteTable by identifier. \n[Command Reference](getVirtualServiceRouteTable)""")
|
|
1824
|
-
@cli_util.option('--virtual-service-route-table-id', required=True, help=u"""Unique VirtualServiceRouteTable identifier.""")
|
|
1825
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1826
|
-
@cli_util.help_option
|
|
1827
|
-
@click.pass_context
|
|
1828
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'VirtualServiceRouteTable'})
|
|
1829
|
-
@cli_util.wrap_exceptions
|
|
1830
|
-
def get_virtual_service_route_table(ctx, from_json, virtual_service_route_table_id):
|
|
1831
|
-
|
|
1832
|
-
if isinstance(virtual_service_route_table_id, six.string_types) and len(virtual_service_route_table_id.strip()) == 0:
|
|
1833
|
-
raise click.UsageError('Parameter --virtual-service-route-table-id cannot be whitespace or empty string')
|
|
1834
|
-
|
|
1835
|
-
kwargs = {}
|
|
1836
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1837
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1838
|
-
result = client.get_virtual_service_route_table(
|
|
1839
|
-
virtual_service_route_table_id=virtual_service_route_table_id,
|
|
1840
|
-
**kwargs
|
|
1841
|
-
)
|
|
1842
|
-
cli_util.render_response(result, ctx)
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
@work_request_group.command(name=cli_util.override('service_mesh.get_work_request.command_name', 'get'), help=u"""Gets the status of the work request with the given ID. \n[Command Reference](getWorkRequest)""")
|
|
1846
|
-
@cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
|
|
1847
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1848
|
-
@cli_util.help_option
|
|
1849
|
-
@click.pass_context
|
|
1850
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'WorkRequest'})
|
|
1851
|
-
@cli_util.wrap_exceptions
|
|
1852
|
-
def get_work_request(ctx, from_json, work_request_id):
|
|
1853
|
-
|
|
1854
|
-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
1855
|
-
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
1856
|
-
|
|
1857
|
-
kwargs = {}
|
|
1858
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1859
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1860
|
-
result = client.get_work_request(
|
|
1861
|
-
work_request_id=work_request_id,
|
|
1862
|
-
**kwargs
|
|
1863
|
-
)
|
|
1864
|
-
cli_util.render_response(result, ctx)
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
@access_policy_group.command(name=cli_util.override('service_mesh.list_access_policies.command_name', 'list'), help=u"""Returns a list of AccessPolicy objects. \n[Command Reference](listAccessPolicies)""")
|
|
1868
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
1869
|
-
@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""")
|
|
1870
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
1871
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
1872
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
1873
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "name"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for 'timeCreated' is descending. Default order for 'name' is ascending.""")
|
|
1874
|
-
@cli_util.option('--mesh-id', help=u"""Unique Mesh identifier.""")
|
|
1875
|
-
@cli_util.option('--id', help=u"""Unique AccessPolicy identifier.""")
|
|
1876
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
1877
|
-
@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.""")
|
|
1878
|
-
@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.""")
|
|
1879
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1880
|
-
@cli_util.help_option
|
|
1881
|
-
@click.pass_context
|
|
1882
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'AccessPolicyCollection'})
|
|
1883
|
-
@cli_util.wrap_exceptions
|
|
1884
|
-
def list_access_policies(ctx, from_json, all_pages, page_size, compartment_id, name, limit, page, sort_order, sort_by, mesh_id, id, lifecycle_state):
|
|
1885
|
-
|
|
1886
|
-
if all_pages and limit:
|
|
1887
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
1888
|
-
|
|
1889
|
-
kwargs = {}
|
|
1890
|
-
if name is not None:
|
|
1891
|
-
kwargs['name'] = name
|
|
1892
|
-
if limit is not None:
|
|
1893
|
-
kwargs['limit'] = limit
|
|
1894
|
-
if page is not None:
|
|
1895
|
-
kwargs['page'] = page
|
|
1896
|
-
if sort_order is not None:
|
|
1897
|
-
kwargs['sort_order'] = sort_order
|
|
1898
|
-
if sort_by is not None:
|
|
1899
|
-
kwargs['sort_by'] = sort_by
|
|
1900
|
-
if mesh_id is not None:
|
|
1901
|
-
kwargs['mesh_id'] = mesh_id
|
|
1902
|
-
if id is not None:
|
|
1903
|
-
kwargs['id'] = id
|
|
1904
|
-
if lifecycle_state is not None:
|
|
1905
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
1906
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1907
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1908
|
-
if all_pages:
|
|
1909
|
-
if page_size:
|
|
1910
|
-
kwargs['limit'] = page_size
|
|
1911
|
-
|
|
1912
|
-
result = cli_util.list_call_get_all_results(
|
|
1913
|
-
client.list_access_policies,
|
|
1914
|
-
compartment_id=compartment_id,
|
|
1915
|
-
**kwargs
|
|
1916
|
-
)
|
|
1917
|
-
elif limit is not None:
|
|
1918
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
1919
|
-
client.list_access_policies,
|
|
1920
|
-
limit,
|
|
1921
|
-
page_size,
|
|
1922
|
-
compartment_id=compartment_id,
|
|
1923
|
-
**kwargs
|
|
1924
|
-
)
|
|
1925
|
-
else:
|
|
1926
|
-
result = client.list_access_policies(
|
|
1927
|
-
compartment_id=compartment_id,
|
|
1928
|
-
**kwargs
|
|
1929
|
-
)
|
|
1930
|
-
cli_util.render_response(result, ctx)
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
@ingress_gateway_route_table_group.command(name=cli_util.override('service_mesh.list_ingress_gateway_route_tables.command_name', 'list'), help=u"""Returns a list of IngressGatewayRouteTable objects. \n[Command Reference](listIngressGatewayRouteTables)""")
|
|
1934
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
1935
|
-
@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""")
|
|
1936
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
1937
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
1938
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
1939
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "name"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for 'timeCreated' is descending. Default order for 'name' is ascending.""")
|
|
1940
|
-
@cli_util.option('--ingress-gateway-id', help=u"""Unique IngressGateway identifier.""")
|
|
1941
|
-
@cli_util.option('--id', help=u"""Unique IngressGatewayRouteTable identifier.""")
|
|
1942
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
1943
|
-
@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.""")
|
|
1944
|
-
@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.""")
|
|
1945
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1946
|
-
@cli_util.help_option
|
|
1947
|
-
@click.pass_context
|
|
1948
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'IngressGatewayRouteTableCollection'})
|
|
1949
|
-
@cli_util.wrap_exceptions
|
|
1950
|
-
def list_ingress_gateway_route_tables(ctx, from_json, all_pages, page_size, compartment_id, name, limit, page, sort_order, sort_by, ingress_gateway_id, id, lifecycle_state):
|
|
1951
|
-
|
|
1952
|
-
if all_pages and limit:
|
|
1953
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
1954
|
-
|
|
1955
|
-
kwargs = {}
|
|
1956
|
-
if name is not None:
|
|
1957
|
-
kwargs['name'] = name
|
|
1958
|
-
if limit is not None:
|
|
1959
|
-
kwargs['limit'] = limit
|
|
1960
|
-
if page is not None:
|
|
1961
|
-
kwargs['page'] = page
|
|
1962
|
-
if sort_order is not None:
|
|
1963
|
-
kwargs['sort_order'] = sort_order
|
|
1964
|
-
if sort_by is not None:
|
|
1965
|
-
kwargs['sort_by'] = sort_by
|
|
1966
|
-
if ingress_gateway_id is not None:
|
|
1967
|
-
kwargs['ingress_gateway_id'] = ingress_gateway_id
|
|
1968
|
-
if id is not None:
|
|
1969
|
-
kwargs['id'] = id
|
|
1970
|
-
if lifecycle_state is not None:
|
|
1971
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
1972
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1973
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
1974
|
-
if all_pages:
|
|
1975
|
-
if page_size:
|
|
1976
|
-
kwargs['limit'] = page_size
|
|
1977
|
-
|
|
1978
|
-
result = cli_util.list_call_get_all_results(
|
|
1979
|
-
client.list_ingress_gateway_route_tables,
|
|
1980
|
-
compartment_id=compartment_id,
|
|
1981
|
-
**kwargs
|
|
1982
|
-
)
|
|
1983
|
-
elif limit is not None:
|
|
1984
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
1985
|
-
client.list_ingress_gateway_route_tables,
|
|
1986
|
-
limit,
|
|
1987
|
-
page_size,
|
|
1988
|
-
compartment_id=compartment_id,
|
|
1989
|
-
**kwargs
|
|
1990
|
-
)
|
|
1991
|
-
else:
|
|
1992
|
-
result = client.list_ingress_gateway_route_tables(
|
|
1993
|
-
compartment_id=compartment_id,
|
|
1994
|
-
**kwargs
|
|
1995
|
-
)
|
|
1996
|
-
cli_util.render_response(result, ctx)
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
@ingress_gateway_group.command(name=cli_util.override('service_mesh.list_ingress_gateways.command_name', 'list'), help=u"""Returns a list of IngressGateway objects. \n[Command Reference](listIngressGateways)""")
|
|
2000
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
2001
|
-
@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""")
|
|
2002
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2003
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2004
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2005
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "name"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for 'timeCreated' is descending. Default order for 'name' is ascending.""")
|
|
2006
|
-
@cli_util.option('--mesh-id', help=u"""Unique Mesh identifier.""")
|
|
2007
|
-
@cli_util.option('--id', help=u"""Unique IngressGateway identifier.""")
|
|
2008
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
2009
|
-
@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.""")
|
|
2010
|
-
@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.""")
|
|
2011
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2012
|
-
@cli_util.help_option
|
|
2013
|
-
@click.pass_context
|
|
2014
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'IngressGatewayCollection'})
|
|
2015
|
-
@cli_util.wrap_exceptions
|
|
2016
|
-
def list_ingress_gateways(ctx, from_json, all_pages, page_size, compartment_id, name, limit, page, sort_order, sort_by, mesh_id, id, lifecycle_state):
|
|
2017
|
-
|
|
2018
|
-
if all_pages and limit:
|
|
2019
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2020
|
-
|
|
2021
|
-
kwargs = {}
|
|
2022
|
-
if name is not None:
|
|
2023
|
-
kwargs['name'] = name
|
|
2024
|
-
if limit is not None:
|
|
2025
|
-
kwargs['limit'] = limit
|
|
2026
|
-
if page is not None:
|
|
2027
|
-
kwargs['page'] = page
|
|
2028
|
-
if sort_order is not None:
|
|
2029
|
-
kwargs['sort_order'] = sort_order
|
|
2030
|
-
if sort_by is not None:
|
|
2031
|
-
kwargs['sort_by'] = sort_by
|
|
2032
|
-
if mesh_id is not None:
|
|
2033
|
-
kwargs['mesh_id'] = mesh_id
|
|
2034
|
-
if id is not None:
|
|
2035
|
-
kwargs['id'] = id
|
|
2036
|
-
if lifecycle_state is not None:
|
|
2037
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
2038
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2039
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2040
|
-
if all_pages:
|
|
2041
|
-
if page_size:
|
|
2042
|
-
kwargs['limit'] = page_size
|
|
2043
|
-
|
|
2044
|
-
result = cli_util.list_call_get_all_results(
|
|
2045
|
-
client.list_ingress_gateways,
|
|
2046
|
-
compartment_id=compartment_id,
|
|
2047
|
-
**kwargs
|
|
2048
|
-
)
|
|
2049
|
-
elif limit is not None:
|
|
2050
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2051
|
-
client.list_ingress_gateways,
|
|
2052
|
-
limit,
|
|
2053
|
-
page_size,
|
|
2054
|
-
compartment_id=compartment_id,
|
|
2055
|
-
**kwargs
|
|
2056
|
-
)
|
|
2057
|
-
else:
|
|
2058
|
-
result = client.list_ingress_gateways(
|
|
2059
|
-
compartment_id=compartment_id,
|
|
2060
|
-
**kwargs
|
|
2061
|
-
)
|
|
2062
|
-
cli_util.render_response(result, ctx)
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
@mesh_group.command(name=cli_util.override('service_mesh.list_meshes.command_name', 'list'), help=u"""Returns a list of Mesh objects. \n[Command Reference](listMeshes)""")
|
|
2066
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
2067
|
-
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the entire displayName given.""")
|
|
2068
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2069
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2070
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2071
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "displayName"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending.""")
|
|
2072
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
2073
|
-
@cli_util.option('--id', help=u"""Unique Mesh identifier.""")
|
|
2074
|
-
@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.""")
|
|
2075
|
-
@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.""")
|
|
2076
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2077
|
-
@cli_util.help_option
|
|
2078
|
-
@click.pass_context
|
|
2079
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'MeshCollection'})
|
|
2080
|
-
@cli_util.wrap_exceptions
|
|
2081
|
-
def list_meshes(ctx, from_json, all_pages, page_size, compartment_id, display_name, limit, page, sort_order, sort_by, lifecycle_state, id):
|
|
2082
|
-
|
|
2083
|
-
if all_pages and limit:
|
|
2084
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2085
|
-
|
|
2086
|
-
kwargs = {}
|
|
2087
|
-
if display_name is not None:
|
|
2088
|
-
kwargs['display_name'] = display_name
|
|
2089
|
-
if limit is not None:
|
|
2090
|
-
kwargs['limit'] = limit
|
|
2091
|
-
if page is not None:
|
|
2092
|
-
kwargs['page'] = page
|
|
2093
|
-
if sort_order is not None:
|
|
2094
|
-
kwargs['sort_order'] = sort_order
|
|
2095
|
-
if sort_by is not None:
|
|
2096
|
-
kwargs['sort_by'] = sort_by
|
|
2097
|
-
if lifecycle_state is not None:
|
|
2098
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
2099
|
-
if id is not None:
|
|
2100
|
-
kwargs['id'] = id
|
|
2101
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2102
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2103
|
-
if all_pages:
|
|
2104
|
-
if page_size:
|
|
2105
|
-
kwargs['limit'] = page_size
|
|
2106
|
-
|
|
2107
|
-
result = cli_util.list_call_get_all_results(
|
|
2108
|
-
client.list_meshes,
|
|
2109
|
-
compartment_id=compartment_id,
|
|
2110
|
-
**kwargs
|
|
2111
|
-
)
|
|
2112
|
-
elif limit is not None:
|
|
2113
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2114
|
-
client.list_meshes,
|
|
2115
|
-
limit,
|
|
2116
|
-
page_size,
|
|
2117
|
-
compartment_id=compartment_id,
|
|
2118
|
-
**kwargs
|
|
2119
|
-
)
|
|
2120
|
-
else:
|
|
2121
|
-
result = client.list_meshes(
|
|
2122
|
-
compartment_id=compartment_id,
|
|
2123
|
-
**kwargs
|
|
2124
|
-
)
|
|
2125
|
-
cli_util.render_response(result, ctx)
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.list_virtual_deployments.command_name', 'list'), help=u"""Returns a list of VirtualDeployments. \n[Command Reference](listVirtualDeployments)""")
|
|
2129
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
2130
|
-
@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""")
|
|
2131
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2132
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2133
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2134
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "name"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for 'timeCreated' is descending. Default order for 'name' is ascending.""")
|
|
2135
|
-
@cli_util.option('--virtual-service-id', help=u"""Unique VirtualService identifier.""")
|
|
2136
|
-
@cli_util.option('--id', help=u"""Unique VirtualDeployment identifier.""")
|
|
2137
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
2138
|
-
@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.""")
|
|
2139
|
-
@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.""")
|
|
2140
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2141
|
-
@cli_util.help_option
|
|
2142
|
-
@click.pass_context
|
|
2143
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'VirtualDeploymentCollection'})
|
|
2144
|
-
@cli_util.wrap_exceptions
|
|
2145
|
-
def list_virtual_deployments(ctx, from_json, all_pages, page_size, compartment_id, name, limit, page, sort_order, sort_by, virtual_service_id, id, lifecycle_state):
|
|
2146
|
-
|
|
2147
|
-
if all_pages and limit:
|
|
2148
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2149
|
-
|
|
2150
|
-
kwargs = {}
|
|
2151
|
-
if name is not None:
|
|
2152
|
-
kwargs['name'] = name
|
|
2153
|
-
if limit is not None:
|
|
2154
|
-
kwargs['limit'] = limit
|
|
2155
|
-
if page is not None:
|
|
2156
|
-
kwargs['page'] = page
|
|
2157
|
-
if sort_order is not None:
|
|
2158
|
-
kwargs['sort_order'] = sort_order
|
|
2159
|
-
if sort_by is not None:
|
|
2160
|
-
kwargs['sort_by'] = sort_by
|
|
2161
|
-
if virtual_service_id is not None:
|
|
2162
|
-
kwargs['virtual_service_id'] = virtual_service_id
|
|
2163
|
-
if id is not None:
|
|
2164
|
-
kwargs['id'] = id
|
|
2165
|
-
if lifecycle_state is not None:
|
|
2166
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
2167
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2168
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2169
|
-
if all_pages:
|
|
2170
|
-
if page_size:
|
|
2171
|
-
kwargs['limit'] = page_size
|
|
2172
|
-
|
|
2173
|
-
result = cli_util.list_call_get_all_results(
|
|
2174
|
-
client.list_virtual_deployments,
|
|
2175
|
-
compartment_id=compartment_id,
|
|
2176
|
-
**kwargs
|
|
2177
|
-
)
|
|
2178
|
-
elif limit is not None:
|
|
2179
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2180
|
-
client.list_virtual_deployments,
|
|
2181
|
-
limit,
|
|
2182
|
-
page_size,
|
|
2183
|
-
compartment_id=compartment_id,
|
|
2184
|
-
**kwargs
|
|
2185
|
-
)
|
|
2186
|
-
else:
|
|
2187
|
-
result = client.list_virtual_deployments(
|
|
2188
|
-
compartment_id=compartment_id,
|
|
2189
|
-
**kwargs
|
|
2190
|
-
)
|
|
2191
|
-
cli_util.render_response(result, ctx)
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
@virtual_service_route_table_group.command(name=cli_util.override('service_mesh.list_virtual_service_route_tables.command_name', 'list'), help=u"""Returns a list of VirtualServiceRouteTable objects. \n[Command Reference](listVirtualServiceRouteTables)""")
|
|
2195
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
2196
|
-
@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""")
|
|
2197
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2198
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2199
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2200
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "name"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for 'timeCreated' is descending. Default order for 'name' is ascending.""")
|
|
2201
|
-
@cli_util.option('--virtual-service-id', help=u"""Unique VirtualService identifier.""")
|
|
2202
|
-
@cli_util.option('--id', help=u"""Unique VirtualServiceRouteTable identifier.""")
|
|
2203
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
2204
|
-
@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.""")
|
|
2205
|
-
@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.""")
|
|
2206
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2207
|
-
@cli_util.help_option
|
|
2208
|
-
@click.pass_context
|
|
2209
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'VirtualServiceRouteTableCollection'})
|
|
2210
|
-
@cli_util.wrap_exceptions
|
|
2211
|
-
def list_virtual_service_route_tables(ctx, from_json, all_pages, page_size, compartment_id, name, limit, page, sort_order, sort_by, virtual_service_id, id, lifecycle_state):
|
|
2212
|
-
|
|
2213
|
-
if all_pages and limit:
|
|
2214
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2215
|
-
|
|
2216
|
-
kwargs = {}
|
|
2217
|
-
if name is not None:
|
|
2218
|
-
kwargs['name'] = name
|
|
2219
|
-
if limit is not None:
|
|
2220
|
-
kwargs['limit'] = limit
|
|
2221
|
-
if page is not None:
|
|
2222
|
-
kwargs['page'] = page
|
|
2223
|
-
if sort_order is not None:
|
|
2224
|
-
kwargs['sort_order'] = sort_order
|
|
2225
|
-
if sort_by is not None:
|
|
2226
|
-
kwargs['sort_by'] = sort_by
|
|
2227
|
-
if virtual_service_id is not None:
|
|
2228
|
-
kwargs['virtual_service_id'] = virtual_service_id
|
|
2229
|
-
if id is not None:
|
|
2230
|
-
kwargs['id'] = id
|
|
2231
|
-
if lifecycle_state is not None:
|
|
2232
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
2233
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2234
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2235
|
-
if all_pages:
|
|
2236
|
-
if page_size:
|
|
2237
|
-
kwargs['limit'] = page_size
|
|
2238
|
-
|
|
2239
|
-
result = cli_util.list_call_get_all_results(
|
|
2240
|
-
client.list_virtual_service_route_tables,
|
|
2241
|
-
compartment_id=compartment_id,
|
|
2242
|
-
**kwargs
|
|
2243
|
-
)
|
|
2244
|
-
elif limit is not None:
|
|
2245
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2246
|
-
client.list_virtual_service_route_tables,
|
|
2247
|
-
limit,
|
|
2248
|
-
page_size,
|
|
2249
|
-
compartment_id=compartment_id,
|
|
2250
|
-
**kwargs
|
|
2251
|
-
)
|
|
2252
|
-
else:
|
|
2253
|
-
result = client.list_virtual_service_route_tables(
|
|
2254
|
-
compartment_id=compartment_id,
|
|
2255
|
-
**kwargs
|
|
2256
|
-
)
|
|
2257
|
-
cli_util.render_response(result, ctx)
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
@virtual_service_group.command(name=cli_util.override('service_mesh.list_virtual_services.command_name', 'list'), help=u"""Returns a list of VirtualService objects. \n[Command Reference](listVirtualServices)""")
|
|
2261
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
2262
|
-
@cli_util.option('--name', help=u"""A filter to return only resources that match the entire name given.""")
|
|
2263
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2264
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2265
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2266
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["id", "timeCreated", "name"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for 'timeCreated' is descending. Default order for 'name' is ascending.""")
|
|
2267
|
-
@cli_util.option('--mesh-id', help=u"""Unique Mesh identifier.""")
|
|
2268
|
-
@cli_util.option('--id', help=u"""Unique VirtualService identifier.""")
|
|
2269
|
-
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources that match the life cycle state given.""")
|
|
2270
|
-
@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.""")
|
|
2271
|
-
@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.""")
|
|
2272
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2273
|
-
@cli_util.help_option
|
|
2274
|
-
@click.pass_context
|
|
2275
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'VirtualServiceCollection'})
|
|
2276
|
-
@cli_util.wrap_exceptions
|
|
2277
|
-
def list_virtual_services(ctx, from_json, all_pages, page_size, compartment_id, name, limit, page, sort_order, sort_by, mesh_id, id, lifecycle_state):
|
|
2278
|
-
|
|
2279
|
-
if all_pages and limit:
|
|
2280
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2281
|
-
|
|
2282
|
-
kwargs = {}
|
|
2283
|
-
if name is not None:
|
|
2284
|
-
kwargs['name'] = name
|
|
2285
|
-
if limit is not None:
|
|
2286
|
-
kwargs['limit'] = limit
|
|
2287
|
-
if page is not None:
|
|
2288
|
-
kwargs['page'] = page
|
|
2289
|
-
if sort_order is not None:
|
|
2290
|
-
kwargs['sort_order'] = sort_order
|
|
2291
|
-
if sort_by is not None:
|
|
2292
|
-
kwargs['sort_by'] = sort_by
|
|
2293
|
-
if mesh_id is not None:
|
|
2294
|
-
kwargs['mesh_id'] = mesh_id
|
|
2295
|
-
if id is not None:
|
|
2296
|
-
kwargs['id'] = id
|
|
2297
|
-
if lifecycle_state is not None:
|
|
2298
|
-
kwargs['lifecycle_state'] = lifecycle_state
|
|
2299
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2300
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2301
|
-
if all_pages:
|
|
2302
|
-
if page_size:
|
|
2303
|
-
kwargs['limit'] = page_size
|
|
2304
|
-
|
|
2305
|
-
result = cli_util.list_call_get_all_results(
|
|
2306
|
-
client.list_virtual_services,
|
|
2307
|
-
compartment_id=compartment_id,
|
|
2308
|
-
**kwargs
|
|
2309
|
-
)
|
|
2310
|
-
elif limit is not None:
|
|
2311
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2312
|
-
client.list_virtual_services,
|
|
2313
|
-
limit,
|
|
2314
|
-
page_size,
|
|
2315
|
-
compartment_id=compartment_id,
|
|
2316
|
-
**kwargs
|
|
2317
|
-
)
|
|
2318
|
-
else:
|
|
2319
|
-
result = client.list_virtual_services(
|
|
2320
|
-
compartment_id=compartment_id,
|
|
2321
|
-
**kwargs
|
|
2322
|
-
)
|
|
2323
|
-
cli_util.render_response(result, ctx)
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
@work_request_group.command(name=cli_util.override('service_mesh.list_work_request_errors.command_name', 'list-work-request-errors'), help=u"""Return a (paginated) list of errors for a given work request. \n[Command Reference](listWorkRequestErrors)""")
|
|
2327
|
-
@cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
|
|
2328
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2329
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2330
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2331
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timestamp"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timestamp is descending.""")
|
|
2332
|
-
@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.""")
|
|
2333
|
-
@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.""")
|
|
2334
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2335
|
-
@cli_util.help_option
|
|
2336
|
-
@click.pass_context
|
|
2337
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'WorkRequestErrorCollection'})
|
|
2338
|
-
@cli_util.wrap_exceptions
|
|
2339
|
-
def list_work_request_errors(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_order, sort_by):
|
|
2340
|
-
|
|
2341
|
-
if all_pages and limit:
|
|
2342
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2343
|
-
|
|
2344
|
-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
2345
|
-
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
2346
|
-
|
|
2347
|
-
kwargs = {}
|
|
2348
|
-
if page is not None:
|
|
2349
|
-
kwargs['page'] = page
|
|
2350
|
-
if limit is not None:
|
|
2351
|
-
kwargs['limit'] = limit
|
|
2352
|
-
if sort_order is not None:
|
|
2353
|
-
kwargs['sort_order'] = sort_order
|
|
2354
|
-
if sort_by is not None:
|
|
2355
|
-
kwargs['sort_by'] = sort_by
|
|
2356
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2357
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2358
|
-
if all_pages:
|
|
2359
|
-
if page_size:
|
|
2360
|
-
kwargs['limit'] = page_size
|
|
2361
|
-
|
|
2362
|
-
result = cli_util.list_call_get_all_results(
|
|
2363
|
-
client.list_work_request_errors,
|
|
2364
|
-
work_request_id=work_request_id,
|
|
2365
|
-
**kwargs
|
|
2366
|
-
)
|
|
2367
|
-
elif limit is not None:
|
|
2368
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2369
|
-
client.list_work_request_errors,
|
|
2370
|
-
limit,
|
|
2371
|
-
page_size,
|
|
2372
|
-
work_request_id=work_request_id,
|
|
2373
|
-
**kwargs
|
|
2374
|
-
)
|
|
2375
|
-
else:
|
|
2376
|
-
result = client.list_work_request_errors(
|
|
2377
|
-
work_request_id=work_request_id,
|
|
2378
|
-
**kwargs
|
|
2379
|
-
)
|
|
2380
|
-
cli_util.render_response(result, ctx)
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
@work_request_group.command(name=cli_util.override('service_mesh.list_work_request_logs.command_name', 'list-work-request-logs'), help=u"""Return a (paginated) list of logs for a given work request. \n[Command Reference](listWorkRequestLogs)""")
|
|
2384
|
-
@cli_util.option('--work-request-id', required=True, help=u"""The ID of the asynchronous request.""")
|
|
2385
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2386
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2387
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2388
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timestamp"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timestamp is descending.""")
|
|
2389
|
-
@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.""")
|
|
2390
|
-
@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.""")
|
|
2391
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2392
|
-
@cli_util.help_option
|
|
2393
|
-
@click.pass_context
|
|
2394
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'WorkRequestLogEntryCollection'})
|
|
2395
|
-
@cli_util.wrap_exceptions
|
|
2396
|
-
def list_work_request_logs(ctx, from_json, all_pages, page_size, work_request_id, page, limit, sort_order, sort_by):
|
|
2397
|
-
|
|
2398
|
-
if all_pages and limit:
|
|
2399
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2400
|
-
|
|
2401
|
-
if isinstance(work_request_id, six.string_types) and len(work_request_id.strip()) == 0:
|
|
2402
|
-
raise click.UsageError('Parameter --work-request-id cannot be whitespace or empty string')
|
|
2403
|
-
|
|
2404
|
-
kwargs = {}
|
|
2405
|
-
if page is not None:
|
|
2406
|
-
kwargs['page'] = page
|
|
2407
|
-
if limit is not None:
|
|
2408
|
-
kwargs['limit'] = limit
|
|
2409
|
-
if sort_order is not None:
|
|
2410
|
-
kwargs['sort_order'] = sort_order
|
|
2411
|
-
if sort_by is not None:
|
|
2412
|
-
kwargs['sort_by'] = sort_by
|
|
2413
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2414
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2415
|
-
if all_pages:
|
|
2416
|
-
if page_size:
|
|
2417
|
-
kwargs['limit'] = page_size
|
|
2418
|
-
|
|
2419
|
-
result = cli_util.list_call_get_all_results(
|
|
2420
|
-
client.list_work_request_logs,
|
|
2421
|
-
work_request_id=work_request_id,
|
|
2422
|
-
**kwargs
|
|
2423
|
-
)
|
|
2424
|
-
elif limit is not None:
|
|
2425
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2426
|
-
client.list_work_request_logs,
|
|
2427
|
-
limit,
|
|
2428
|
-
page_size,
|
|
2429
|
-
work_request_id=work_request_id,
|
|
2430
|
-
**kwargs
|
|
2431
|
-
)
|
|
2432
|
-
else:
|
|
2433
|
-
result = client.list_work_request_logs(
|
|
2434
|
-
work_request_id=work_request_id,
|
|
2435
|
-
**kwargs
|
|
2436
|
-
)
|
|
2437
|
-
cli_util.render_response(result, ctx)
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
@work_request_group.command(name=cli_util.override('service_mesh.list_work_requests.command_name', 'list'), help=u"""Lists the work requests in a compartment. \n[Command Reference](listWorkRequests)""")
|
|
2441
|
-
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
|
|
2442
|
-
@cli_util.option('--work-request-id', help=u"""The ID of the asynchronous work request.""")
|
|
2443
|
-
@cli_util.option('--resource-id', help=u"""A filter to return work requests that match the given resourceId.""")
|
|
2444
|
-
@cli_util.option('--operation-status', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "CANCELING", "CANCELED"]), help=u"""A filter to return only resources that match the operation status given.""")
|
|
2445
|
-
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
2446
|
-
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["timeAccepted"]), help=u"""The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.""")
|
|
2447
|
-
@cli_util.option('--page', help=u"""A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response.""")
|
|
2448
|
-
@cli_util.option('--limit', type=click.INT, help=u"""The maximum number of items to return.""")
|
|
2449
|
-
@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.""")
|
|
2450
|
-
@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.""")
|
|
2451
|
-
@json_skeleton_utils.get_cli_json_input_option({})
|
|
2452
|
-
@cli_util.help_option
|
|
2453
|
-
@click.pass_context
|
|
2454
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'service_mesh', 'class': 'WorkRequestCollection'})
|
|
2455
|
-
@cli_util.wrap_exceptions
|
|
2456
|
-
def list_work_requests(ctx, from_json, all_pages, page_size, compartment_id, work_request_id, resource_id, operation_status, sort_order, sort_by, page, limit):
|
|
2457
|
-
|
|
2458
|
-
if all_pages and limit:
|
|
2459
|
-
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
2460
|
-
|
|
2461
|
-
kwargs = {}
|
|
2462
|
-
if work_request_id is not None:
|
|
2463
|
-
kwargs['work_request_id'] = work_request_id
|
|
2464
|
-
if resource_id is not None:
|
|
2465
|
-
kwargs['resource_id'] = resource_id
|
|
2466
|
-
if operation_status is not None:
|
|
2467
|
-
kwargs['operation_status'] = operation_status
|
|
2468
|
-
if sort_order is not None:
|
|
2469
|
-
kwargs['sort_order'] = sort_order
|
|
2470
|
-
if sort_by is not None:
|
|
2471
|
-
kwargs['sort_by'] = sort_by
|
|
2472
|
-
if page is not None:
|
|
2473
|
-
kwargs['page'] = page
|
|
2474
|
-
if limit is not None:
|
|
2475
|
-
kwargs['limit'] = limit
|
|
2476
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2477
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2478
|
-
if all_pages:
|
|
2479
|
-
if page_size:
|
|
2480
|
-
kwargs['limit'] = page_size
|
|
2481
|
-
|
|
2482
|
-
result = cli_util.list_call_get_all_results(
|
|
2483
|
-
client.list_work_requests,
|
|
2484
|
-
compartment_id=compartment_id,
|
|
2485
|
-
**kwargs
|
|
2486
|
-
)
|
|
2487
|
-
elif limit is not None:
|
|
2488
|
-
result = cli_util.list_call_get_up_to_limit(
|
|
2489
|
-
client.list_work_requests,
|
|
2490
|
-
limit,
|
|
2491
|
-
page_size,
|
|
2492
|
-
compartment_id=compartment_id,
|
|
2493
|
-
**kwargs
|
|
2494
|
-
)
|
|
2495
|
-
else:
|
|
2496
|
-
result = client.list_work_requests(
|
|
2497
|
-
compartment_id=compartment_id,
|
|
2498
|
-
**kwargs
|
|
2499
|
-
)
|
|
2500
|
-
cli_util.render_response(result, ctx)
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
@access_policy_group.command(name=cli_util.override('service_mesh.update_access_policy.command_name', 'update'), help=u"""Updates the AccessPolicy. \n[Command Reference](updateAccessPolicy)""")
|
|
2504
|
-
@cli_util.option('--access-policy-id', required=True, help=u"""Unique AccessPolicy identifier.""")
|
|
2505
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
2506
|
-
|
|
2507
|
-
Example: `This is my new resource`""")
|
|
2508
|
-
@cli_util.option('--rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""List of applicable rules.
|
|
2509
|
-
|
|
2510
|
-
This option is a JSON list with items of type AccessPolicyRuleDetails. For documentation on AccessPolicyRuleDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/AccessPolicyRuleDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2511
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2512
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2513
|
-
@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.""")
|
|
2514
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2515
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
2516
|
-
@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.""")
|
|
2517
|
-
@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.""")
|
|
2518
|
-
@json_skeleton_utils.get_cli_json_input_option({'rules': {'module': 'service_mesh', 'class': 'list[AccessPolicyRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2519
|
-
@cli_util.help_option
|
|
2520
|
-
@click.pass_context
|
|
2521
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'rules': {'module': 'service_mesh', 'class': 'list[AccessPolicyRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2522
|
-
@cli_util.wrap_exceptions
|
|
2523
|
-
def update_access_policy(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, access_policy_id, description, rules, freeform_tags, defined_tags, if_match):
|
|
2524
|
-
|
|
2525
|
-
if isinstance(access_policy_id, six.string_types) and len(access_policy_id.strip()) == 0:
|
|
2526
|
-
raise click.UsageError('Parameter --access-policy-id cannot be whitespace or empty string')
|
|
2527
|
-
if not force:
|
|
2528
|
-
if rules or freeform_tags or defined_tags:
|
|
2529
|
-
if not click.confirm("WARNING: Updates to rules and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2530
|
-
ctx.abort()
|
|
2531
|
-
|
|
2532
|
-
kwargs = {}
|
|
2533
|
-
if if_match is not None:
|
|
2534
|
-
kwargs['if_match'] = if_match
|
|
2535
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2536
|
-
|
|
2537
|
-
_details = {}
|
|
2538
|
-
|
|
2539
|
-
if description is not None:
|
|
2540
|
-
_details['description'] = description
|
|
2541
|
-
|
|
2542
|
-
if rules is not None:
|
|
2543
|
-
_details['rules'] = cli_util.parse_json_parameter("rules", rules)
|
|
2544
|
-
|
|
2545
|
-
if freeform_tags is not None:
|
|
2546
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2547
|
-
|
|
2548
|
-
if defined_tags is not None:
|
|
2549
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
2550
|
-
|
|
2551
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2552
|
-
result = client.update_access_policy(
|
|
2553
|
-
access_policy_id=access_policy_id,
|
|
2554
|
-
update_access_policy_details=_details,
|
|
2555
|
-
**kwargs
|
|
2556
|
-
)
|
|
2557
|
-
if wait_for_state:
|
|
2558
|
-
|
|
2559
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
2560
|
-
try:
|
|
2561
|
-
wait_period_kwargs = {}
|
|
2562
|
-
if max_wait_seconds is not None:
|
|
2563
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
2564
|
-
if wait_interval_seconds is not None:
|
|
2565
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
2566
|
-
if 'opc-work-request-id' not in result.headers:
|
|
2567
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
2568
|
-
cli_util.render_response(result, ctx)
|
|
2569
|
-
return
|
|
2570
|
-
|
|
2571
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
2572
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
2573
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
2574
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
2575
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2576
|
-
cli_util.render_response(result, ctx)
|
|
2577
|
-
sys.exit(2)
|
|
2578
|
-
except Exception:
|
|
2579
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2580
|
-
cli_util.render_response(result, ctx)
|
|
2581
|
-
raise
|
|
2582
|
-
else:
|
|
2583
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
2584
|
-
cli_util.render_response(result, ctx)
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
@ingress_gateway_group.command(name=cli_util.override('service_mesh.update_ingress_gateway.command_name', 'update'), help=u"""Updates the IngressGateway. \n[Command Reference](updateIngressGateway)""")
|
|
2588
|
-
@cli_util.option('--ingress-gateway-id', required=True, help=u"""Unique IngressGateway identifier.""")
|
|
2589
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
2590
|
-
|
|
2591
|
-
Example: `This is my new resource`""")
|
|
2592
|
-
@cli_util.option('--hosts', type=custom_types.CLI_COMPLEX_TYPE, help=u"""An array of hostnames and their listener configuration that this gateway will bind to.
|
|
2593
|
-
|
|
2594
|
-
This option is a JSON list with items of type IngressGatewayHost. For documentation on IngressGatewayHost please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/IngressGatewayHost.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2595
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2596
|
-
@cli_util.option('--mtls', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2597
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2598
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2599
|
-
@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.""")
|
|
2600
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2601
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
2602
|
-
@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.""")
|
|
2603
|
-
@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.""")
|
|
2604
|
-
@json_skeleton_utils.get_cli_json_input_option({'hosts': {'module': 'service_mesh', 'class': 'list[IngressGatewayHost]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'mtls': {'module': 'service_mesh', 'class': 'IngressGatewayMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2605
|
-
@cli_util.help_option
|
|
2606
|
-
@click.pass_context
|
|
2607
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'hosts': {'module': 'service_mesh', 'class': 'list[IngressGatewayHost]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'mtls': {'module': 'service_mesh', 'class': 'IngressGatewayMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2608
|
-
@cli_util.wrap_exceptions
|
|
2609
|
-
def update_ingress_gateway(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_id, description, hosts, access_logging, mtls, freeform_tags, defined_tags, if_match):
|
|
2610
|
-
|
|
2611
|
-
if isinstance(ingress_gateway_id, six.string_types) and len(ingress_gateway_id.strip()) == 0:
|
|
2612
|
-
raise click.UsageError('Parameter --ingress-gateway-id cannot be whitespace or empty string')
|
|
2613
|
-
if not force:
|
|
2614
|
-
if hosts or access_logging or mtls or freeform_tags or defined_tags:
|
|
2615
|
-
if not click.confirm("WARNING: Updates to hosts and access-logging and mtls and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2616
|
-
ctx.abort()
|
|
2617
|
-
|
|
2618
|
-
kwargs = {}
|
|
2619
|
-
if if_match is not None:
|
|
2620
|
-
kwargs['if_match'] = if_match
|
|
2621
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2622
|
-
|
|
2623
|
-
_details = {}
|
|
2624
|
-
|
|
2625
|
-
if description is not None:
|
|
2626
|
-
_details['description'] = description
|
|
2627
|
-
|
|
2628
|
-
if hosts is not None:
|
|
2629
|
-
_details['hosts'] = cli_util.parse_json_parameter("hosts", hosts)
|
|
2630
|
-
|
|
2631
|
-
if access_logging is not None:
|
|
2632
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
2633
|
-
|
|
2634
|
-
if mtls is not None:
|
|
2635
|
-
_details['mtls'] = cli_util.parse_json_parameter("mtls", mtls)
|
|
2636
|
-
|
|
2637
|
-
if freeform_tags is not None:
|
|
2638
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2639
|
-
|
|
2640
|
-
if defined_tags is not None:
|
|
2641
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
2642
|
-
|
|
2643
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2644
|
-
result = client.update_ingress_gateway(
|
|
2645
|
-
ingress_gateway_id=ingress_gateway_id,
|
|
2646
|
-
update_ingress_gateway_details=_details,
|
|
2647
|
-
**kwargs
|
|
2648
|
-
)
|
|
2649
|
-
if wait_for_state:
|
|
2650
|
-
|
|
2651
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
2652
|
-
try:
|
|
2653
|
-
wait_period_kwargs = {}
|
|
2654
|
-
if max_wait_seconds is not None:
|
|
2655
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
2656
|
-
if wait_interval_seconds is not None:
|
|
2657
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
2658
|
-
if 'opc-work-request-id' not in result.headers:
|
|
2659
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
2660
|
-
cli_util.render_response(result, ctx)
|
|
2661
|
-
return
|
|
2662
|
-
|
|
2663
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
2664
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
2665
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
2666
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
2667
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2668
|
-
cli_util.render_response(result, ctx)
|
|
2669
|
-
sys.exit(2)
|
|
2670
|
-
except Exception:
|
|
2671
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2672
|
-
cli_util.render_response(result, ctx)
|
|
2673
|
-
raise
|
|
2674
|
-
else:
|
|
2675
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
2676
|
-
cli_util.render_response(result, ctx)
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
@ingress_gateway_route_table_group.command(name=cli_util.override('service_mesh.update_ingress_gateway_route_table.command_name', 'update'), help=u"""Updates the IngressGatewayRouteTable. \n[Command Reference](updateIngressGatewayRouteTable)""")
|
|
2680
|
-
@cli_util.option('--ingress-gateway-route-table-id', required=True, help=u"""Unique IngressGatewayRouteTable identifier.""")
|
|
2681
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
2682
|
-
|
|
2683
|
-
Example: `This is my new resource`""")
|
|
2684
|
-
@cli_util.option('--priority', type=click.INT, help=u"""The priority of the route table. Lower value means higher priority. The routes are declared based on the priority.""")
|
|
2685
|
-
@cli_util.option('--route-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The route rules for the ingress gateway.
|
|
2686
|
-
|
|
2687
|
-
This option is a JSON list with items of type IngressGatewayTrafficRouteRuleDetails. For documentation on IngressGatewayTrafficRouteRuleDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/IngressGatewayTrafficRouteRuleDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2688
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2689
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2690
|
-
@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.""")
|
|
2691
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2692
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
2693
|
-
@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.""")
|
|
2694
|
-
@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.""")
|
|
2695
|
-
@json_skeleton_utils.get_cli_json_input_option({'route-rules': {'module': 'service_mesh', 'class': 'list[IngressGatewayTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2696
|
-
@cli_util.help_option
|
|
2697
|
-
@click.pass_context
|
|
2698
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'route-rules': {'module': 'service_mesh', 'class': 'list[IngressGatewayTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2699
|
-
@cli_util.wrap_exceptions
|
|
2700
|
-
def update_ingress_gateway_route_table(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, ingress_gateway_route_table_id, description, priority, route_rules, freeform_tags, defined_tags, if_match):
|
|
2701
|
-
|
|
2702
|
-
if isinstance(ingress_gateway_route_table_id, six.string_types) and len(ingress_gateway_route_table_id.strip()) == 0:
|
|
2703
|
-
raise click.UsageError('Parameter --ingress-gateway-route-table-id cannot be whitespace or empty string')
|
|
2704
|
-
if not force:
|
|
2705
|
-
if route_rules or freeform_tags or defined_tags:
|
|
2706
|
-
if not click.confirm("WARNING: Updates to route-rules and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2707
|
-
ctx.abort()
|
|
2708
|
-
|
|
2709
|
-
kwargs = {}
|
|
2710
|
-
if if_match is not None:
|
|
2711
|
-
kwargs['if_match'] = if_match
|
|
2712
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2713
|
-
|
|
2714
|
-
_details = {}
|
|
2715
|
-
|
|
2716
|
-
if description is not None:
|
|
2717
|
-
_details['description'] = description
|
|
2718
|
-
|
|
2719
|
-
if priority is not None:
|
|
2720
|
-
_details['priority'] = priority
|
|
2721
|
-
|
|
2722
|
-
if route_rules is not None:
|
|
2723
|
-
_details['routeRules'] = cli_util.parse_json_parameter("route_rules", route_rules)
|
|
2724
|
-
|
|
2725
|
-
if freeform_tags is not None:
|
|
2726
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2727
|
-
|
|
2728
|
-
if defined_tags is not None:
|
|
2729
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
2730
|
-
|
|
2731
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2732
|
-
result = client.update_ingress_gateway_route_table(
|
|
2733
|
-
ingress_gateway_route_table_id=ingress_gateway_route_table_id,
|
|
2734
|
-
update_ingress_gateway_route_table_details=_details,
|
|
2735
|
-
**kwargs
|
|
2736
|
-
)
|
|
2737
|
-
if wait_for_state:
|
|
2738
|
-
|
|
2739
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
2740
|
-
try:
|
|
2741
|
-
wait_period_kwargs = {}
|
|
2742
|
-
if max_wait_seconds is not None:
|
|
2743
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
2744
|
-
if wait_interval_seconds is not None:
|
|
2745
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
2746
|
-
if 'opc-work-request-id' not in result.headers:
|
|
2747
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
2748
|
-
cli_util.render_response(result, ctx)
|
|
2749
|
-
return
|
|
2750
|
-
|
|
2751
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
2752
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
2753
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
2754
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
2755
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2756
|
-
cli_util.render_response(result, ctx)
|
|
2757
|
-
sys.exit(2)
|
|
2758
|
-
except Exception:
|
|
2759
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2760
|
-
cli_util.render_response(result, ctx)
|
|
2761
|
-
raise
|
|
2762
|
-
else:
|
|
2763
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
2764
|
-
cli_util.render_response(result, ctx)
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
@mesh_group.command(name=cli_util.override('service_mesh.update_mesh.command_name', 'update'), help=u"""Updates the Mesh. \n[Command Reference](updateMesh)""")
|
|
2768
|
-
@cli_util.option('--mesh-id', required=True, help=u"""Unique Mesh identifier.""")
|
|
2769
|
-
@cli_util.option('--display-name', help=u"""A user-friendly name. The name does not have to be unique and can be changed after creation. Avoid entering confidential information.
|
|
2770
|
-
|
|
2771
|
-
Example: `My new resource`""")
|
|
2772
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
2773
|
-
|
|
2774
|
-
Example: `This is my new resource`""")
|
|
2775
|
-
@cli_util.option('--mtls', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2776
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2777
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2778
|
-
@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.""")
|
|
2779
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2780
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
2781
|
-
@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.""")
|
|
2782
|
-
@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.""")
|
|
2783
|
-
@json_skeleton_utils.get_cli_json_input_option({'mtls': {'module': 'service_mesh', 'class': 'MeshMutualTransportLayerSecurity'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2784
|
-
@cli_util.help_option
|
|
2785
|
-
@click.pass_context
|
|
2786
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'mtls': {'module': 'service_mesh', 'class': 'MeshMutualTransportLayerSecurity'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2787
|
-
@cli_util.wrap_exceptions
|
|
2788
|
-
def update_mesh(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, mesh_id, display_name, description, mtls, freeform_tags, defined_tags, if_match):
|
|
2789
|
-
|
|
2790
|
-
if isinstance(mesh_id, six.string_types) and len(mesh_id.strip()) == 0:
|
|
2791
|
-
raise click.UsageError('Parameter --mesh-id cannot be whitespace or empty string')
|
|
2792
|
-
if not force:
|
|
2793
|
-
if mtls or freeform_tags or defined_tags:
|
|
2794
|
-
if not click.confirm("WARNING: Updates to mtls and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2795
|
-
ctx.abort()
|
|
2796
|
-
|
|
2797
|
-
kwargs = {}
|
|
2798
|
-
if if_match is not None:
|
|
2799
|
-
kwargs['if_match'] = if_match
|
|
2800
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2801
|
-
|
|
2802
|
-
_details = {}
|
|
2803
|
-
|
|
2804
|
-
if display_name is not None:
|
|
2805
|
-
_details['displayName'] = display_name
|
|
2806
|
-
|
|
2807
|
-
if description is not None:
|
|
2808
|
-
_details['description'] = description
|
|
2809
|
-
|
|
2810
|
-
if mtls is not None:
|
|
2811
|
-
_details['mtls'] = cli_util.parse_json_parameter("mtls", mtls)
|
|
2812
|
-
|
|
2813
|
-
if freeform_tags is not None:
|
|
2814
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2815
|
-
|
|
2816
|
-
if defined_tags is not None:
|
|
2817
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
2818
|
-
|
|
2819
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2820
|
-
result = client.update_mesh(
|
|
2821
|
-
mesh_id=mesh_id,
|
|
2822
|
-
update_mesh_details=_details,
|
|
2823
|
-
**kwargs
|
|
2824
|
-
)
|
|
2825
|
-
if wait_for_state:
|
|
2826
|
-
|
|
2827
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
2828
|
-
try:
|
|
2829
|
-
wait_period_kwargs = {}
|
|
2830
|
-
if max_wait_seconds is not None:
|
|
2831
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
2832
|
-
if wait_interval_seconds is not None:
|
|
2833
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
2834
|
-
if 'opc-work-request-id' not in result.headers:
|
|
2835
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
2836
|
-
cli_util.render_response(result, ctx)
|
|
2837
|
-
return
|
|
2838
|
-
|
|
2839
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
2840
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
2841
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
2842
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
2843
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2844
|
-
cli_util.render_response(result, ctx)
|
|
2845
|
-
sys.exit(2)
|
|
2846
|
-
except Exception:
|
|
2847
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2848
|
-
cli_util.render_response(result, ctx)
|
|
2849
|
-
raise
|
|
2850
|
-
else:
|
|
2851
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
2852
|
-
cli_util.render_response(result, ctx)
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.update_virtual_deployment.command_name', 'update'), help=u"""Updates the VirtualDeployment. \n[Command Reference](updateVirtualDeployment)""")
|
|
2856
|
-
@cli_util.option('--virtual-deployment-id', required=True, help=u"""Unique VirtualDeployment identifier.""")
|
|
2857
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
2858
|
-
|
|
2859
|
-
Example: `This is my new resource`""")
|
|
2860
|
-
@cli_util.option('--service-discovery', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2861
|
-
@cli_util.option('--listeners', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The listeners for the virtual deployment.
|
|
2862
|
-
|
|
2863
|
-
This option is a JSON list with items of type VirtualDeploymentListener. For documentation on VirtualDeploymentListener please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualDeploymentListener.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2864
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2865
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2866
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2867
|
-
@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.""")
|
|
2868
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2869
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
2870
|
-
@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.""")
|
|
2871
|
-
@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.""")
|
|
2872
|
-
@json_skeleton_utils.get_cli_json_input_option({'service-discovery': {'module': 'service_mesh', 'class': 'ServiceDiscoveryConfiguration'}, 'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2873
|
-
@cli_util.help_option
|
|
2874
|
-
@click.pass_context
|
|
2875
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'service-discovery': {'module': 'service_mesh', 'class': 'ServiceDiscoveryConfiguration'}, 'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2876
|
-
@cli_util.wrap_exceptions
|
|
2877
|
-
def update_virtual_deployment(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_deployment_id, description, service_discovery, listeners, access_logging, freeform_tags, defined_tags, if_match):
|
|
2878
|
-
|
|
2879
|
-
if isinstance(virtual_deployment_id, six.string_types) and len(virtual_deployment_id.strip()) == 0:
|
|
2880
|
-
raise click.UsageError('Parameter --virtual-deployment-id cannot be whitespace or empty string')
|
|
2881
|
-
if not force:
|
|
2882
|
-
if service_discovery or listeners or access_logging or freeform_tags or defined_tags:
|
|
2883
|
-
if not click.confirm("WARNING: Updates to service-discovery and listeners and access-logging and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2884
|
-
ctx.abort()
|
|
2885
|
-
|
|
2886
|
-
kwargs = {}
|
|
2887
|
-
if if_match is not None:
|
|
2888
|
-
kwargs['if_match'] = if_match
|
|
2889
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2890
|
-
|
|
2891
|
-
_details = {}
|
|
2892
|
-
|
|
2893
|
-
if description is not None:
|
|
2894
|
-
_details['description'] = description
|
|
2895
|
-
|
|
2896
|
-
if service_discovery is not None:
|
|
2897
|
-
_details['serviceDiscovery'] = cli_util.parse_json_parameter("service_discovery", service_discovery)
|
|
2898
|
-
|
|
2899
|
-
if listeners is not None:
|
|
2900
|
-
_details['listeners'] = cli_util.parse_json_parameter("listeners", listeners)
|
|
2901
|
-
|
|
2902
|
-
if access_logging is not None:
|
|
2903
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
2904
|
-
|
|
2905
|
-
if freeform_tags is not None:
|
|
2906
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2907
|
-
|
|
2908
|
-
if defined_tags is not None:
|
|
2909
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
2910
|
-
|
|
2911
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
2912
|
-
result = client.update_virtual_deployment(
|
|
2913
|
-
virtual_deployment_id=virtual_deployment_id,
|
|
2914
|
-
update_virtual_deployment_details=_details,
|
|
2915
|
-
**kwargs
|
|
2916
|
-
)
|
|
2917
|
-
if wait_for_state:
|
|
2918
|
-
|
|
2919
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
2920
|
-
try:
|
|
2921
|
-
wait_period_kwargs = {}
|
|
2922
|
-
if max_wait_seconds is not None:
|
|
2923
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
2924
|
-
if wait_interval_seconds is not None:
|
|
2925
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
2926
|
-
if 'opc-work-request-id' not in result.headers:
|
|
2927
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
2928
|
-
cli_util.render_response(result, ctx)
|
|
2929
|
-
return
|
|
2930
|
-
|
|
2931
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
2932
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
2933
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
2934
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
2935
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2936
|
-
cli_util.render_response(result, ctx)
|
|
2937
|
-
sys.exit(2)
|
|
2938
|
-
except Exception:
|
|
2939
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2940
|
-
cli_util.render_response(result, ctx)
|
|
2941
|
-
raise
|
|
2942
|
-
else:
|
|
2943
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
2944
|
-
cli_util.render_response(result, ctx)
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.update_virtual_deployment_dns_service_discovery_configuration.command_name', 'update-virtual-deployment-dns-service-discovery-configuration'), help=u"""Updates the VirtualDeployment. \n[Command Reference](updateVirtualDeployment)""")
|
|
2948
|
-
@cli_util.option('--virtual-deployment-id', required=True, help=u"""Unique VirtualDeployment identifier.""")
|
|
2949
|
-
@cli_util.option('--service-discovery-hostname', required=True, help=u"""The hostname of the virtual deployments.""")
|
|
2950
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
2951
|
-
|
|
2952
|
-
Example: `This is my new resource`""")
|
|
2953
|
-
@cli_util.option('--listeners', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The listeners for the virtual deployment.
|
|
2954
|
-
|
|
2955
|
-
This option is a JSON list with items of type VirtualDeploymentListener. For documentation on VirtualDeploymentListener please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualDeploymentListener.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2956
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2957
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2958
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2959
|
-
@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.""")
|
|
2960
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2961
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
2962
|
-
@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.""")
|
|
2963
|
-
@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.""")
|
|
2964
|
-
@json_skeleton_utils.get_cli_json_input_option({'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2965
|
-
@cli_util.help_option
|
|
2966
|
-
@click.pass_context
|
|
2967
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
2968
|
-
@cli_util.wrap_exceptions
|
|
2969
|
-
def update_virtual_deployment_dns_service_discovery_configuration(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_deployment_id, service_discovery_hostname, description, listeners, access_logging, freeform_tags, defined_tags, if_match):
|
|
2970
|
-
|
|
2971
|
-
if isinstance(virtual_deployment_id, six.string_types) and len(virtual_deployment_id.strip()) == 0:
|
|
2972
|
-
raise click.UsageError('Parameter --virtual-deployment-id cannot be whitespace or empty string')
|
|
2973
|
-
if not force:
|
|
2974
|
-
if listeners or access_logging or freeform_tags or defined_tags:
|
|
2975
|
-
if not click.confirm("WARNING: Updates to listeners and access-logging and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2976
|
-
ctx.abort()
|
|
2977
|
-
|
|
2978
|
-
kwargs = {}
|
|
2979
|
-
if if_match is not None:
|
|
2980
|
-
kwargs['if_match'] = if_match
|
|
2981
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2982
|
-
|
|
2983
|
-
_details = {}
|
|
2984
|
-
_details['serviceDiscovery'] = {}
|
|
2985
|
-
_details['serviceDiscovery']['hostname'] = service_discovery_hostname
|
|
2986
|
-
|
|
2987
|
-
if description is not None:
|
|
2988
|
-
_details['description'] = description
|
|
2989
|
-
|
|
2990
|
-
if listeners is not None:
|
|
2991
|
-
_details['listeners'] = cli_util.parse_json_parameter("listeners", listeners)
|
|
2992
|
-
|
|
2993
|
-
if access_logging is not None:
|
|
2994
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
2995
|
-
|
|
2996
|
-
if freeform_tags is not None:
|
|
2997
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2998
|
-
|
|
2999
|
-
if defined_tags is not None:
|
|
3000
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
3001
|
-
|
|
3002
|
-
_details['serviceDiscovery']['type'] = 'DNS'
|
|
3003
|
-
|
|
3004
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
3005
|
-
result = client.update_virtual_deployment(
|
|
3006
|
-
virtual_deployment_id=virtual_deployment_id,
|
|
3007
|
-
update_virtual_deployment_details=_details,
|
|
3008
|
-
**kwargs
|
|
3009
|
-
)
|
|
3010
|
-
if wait_for_state:
|
|
3011
|
-
|
|
3012
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
3013
|
-
try:
|
|
3014
|
-
wait_period_kwargs = {}
|
|
3015
|
-
if max_wait_seconds is not None:
|
|
3016
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
3017
|
-
if wait_interval_seconds is not None:
|
|
3018
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
3019
|
-
if 'opc-work-request-id' not in result.headers:
|
|
3020
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
3021
|
-
cli_util.render_response(result, ctx)
|
|
3022
|
-
return
|
|
3023
|
-
|
|
3024
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
3025
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
3026
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
3027
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
3028
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3029
|
-
cli_util.render_response(result, ctx)
|
|
3030
|
-
sys.exit(2)
|
|
3031
|
-
except Exception:
|
|
3032
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3033
|
-
cli_util.render_response(result, ctx)
|
|
3034
|
-
raise
|
|
3035
|
-
else:
|
|
3036
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
3037
|
-
cli_util.render_response(result, ctx)
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
@virtual_deployment_group.command(name=cli_util.override('service_mesh.update_virtual_deployment_disabled_service_discovery_configuration.command_name', 'update-virtual-deployment-disabled-service-discovery-configuration'), help=u"""Updates the VirtualDeployment. \n[Command Reference](updateVirtualDeployment)""")
|
|
3041
|
-
@cli_util.option('--virtual-deployment-id', required=True, help=u"""Unique VirtualDeployment identifier.""")
|
|
3042
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
3043
|
-
|
|
3044
|
-
Example: `This is my new resource`""")
|
|
3045
|
-
@cli_util.option('--listeners', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The listeners for the virtual deployment.
|
|
3046
|
-
|
|
3047
|
-
This option is a JSON list with items of type VirtualDeploymentListener. For documentation on VirtualDeploymentListener please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualDeploymentListener.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3048
|
-
@cli_util.option('--access-logging', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3049
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3050
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3051
|
-
@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.""")
|
|
3052
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
3053
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
3054
|
-
@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.""")
|
|
3055
|
-
@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.""")
|
|
3056
|
-
@json_skeleton_utils.get_cli_json_input_option({'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
3057
|
-
@cli_util.help_option
|
|
3058
|
-
@click.pass_context
|
|
3059
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'listeners': {'module': 'service_mesh', 'class': 'list[VirtualDeploymentListener]'}, 'access-logging': {'module': 'service_mesh', 'class': 'AccessLoggingConfiguration'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
3060
|
-
@cli_util.wrap_exceptions
|
|
3061
|
-
def update_virtual_deployment_disabled_service_discovery_configuration(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_deployment_id, description, listeners, access_logging, freeform_tags, defined_tags, if_match):
|
|
3062
|
-
|
|
3063
|
-
if isinstance(virtual_deployment_id, six.string_types) and len(virtual_deployment_id.strip()) == 0:
|
|
3064
|
-
raise click.UsageError('Parameter --virtual-deployment-id cannot be whitespace or empty string')
|
|
3065
|
-
if not force:
|
|
3066
|
-
if listeners or access_logging or freeform_tags or defined_tags:
|
|
3067
|
-
if not click.confirm("WARNING: Updates to listeners and access-logging and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
3068
|
-
ctx.abort()
|
|
3069
|
-
|
|
3070
|
-
kwargs = {}
|
|
3071
|
-
if if_match is not None:
|
|
3072
|
-
kwargs['if_match'] = if_match
|
|
3073
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
3074
|
-
|
|
3075
|
-
_details = {}
|
|
3076
|
-
_details['serviceDiscovery'] = {}
|
|
3077
|
-
|
|
3078
|
-
if description is not None:
|
|
3079
|
-
_details['description'] = description
|
|
3080
|
-
|
|
3081
|
-
if listeners is not None:
|
|
3082
|
-
_details['listeners'] = cli_util.parse_json_parameter("listeners", listeners)
|
|
3083
|
-
|
|
3084
|
-
if access_logging is not None:
|
|
3085
|
-
_details['accessLogging'] = cli_util.parse_json_parameter("access_logging", access_logging)
|
|
3086
|
-
|
|
3087
|
-
if freeform_tags is not None:
|
|
3088
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
3089
|
-
|
|
3090
|
-
if defined_tags is not None:
|
|
3091
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
3092
|
-
|
|
3093
|
-
_details['serviceDiscovery']['type'] = 'DISABLED'
|
|
3094
|
-
|
|
3095
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
3096
|
-
result = client.update_virtual_deployment(
|
|
3097
|
-
virtual_deployment_id=virtual_deployment_id,
|
|
3098
|
-
update_virtual_deployment_details=_details,
|
|
3099
|
-
**kwargs
|
|
3100
|
-
)
|
|
3101
|
-
if wait_for_state:
|
|
3102
|
-
|
|
3103
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
3104
|
-
try:
|
|
3105
|
-
wait_period_kwargs = {}
|
|
3106
|
-
if max_wait_seconds is not None:
|
|
3107
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
3108
|
-
if wait_interval_seconds is not None:
|
|
3109
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
3110
|
-
if 'opc-work-request-id' not in result.headers:
|
|
3111
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
3112
|
-
cli_util.render_response(result, ctx)
|
|
3113
|
-
return
|
|
3114
|
-
|
|
3115
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
3116
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
3117
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
3118
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
3119
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3120
|
-
cli_util.render_response(result, ctx)
|
|
3121
|
-
sys.exit(2)
|
|
3122
|
-
except Exception:
|
|
3123
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3124
|
-
cli_util.render_response(result, ctx)
|
|
3125
|
-
raise
|
|
3126
|
-
else:
|
|
3127
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
3128
|
-
cli_util.render_response(result, ctx)
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
@virtual_service_group.command(name=cli_util.override('service_mesh.update_virtual_service.command_name', 'update'), help=u"""Updates the VirtualService. \n[Command Reference](updateVirtualService)""")
|
|
3132
|
-
@cli_util.option('--virtual-service-id', required=True, help=u"""Unique VirtualService identifier.""")
|
|
3133
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
3134
|
-
|
|
3135
|
-
Example: `This is my new resource`""")
|
|
3136
|
-
@cli_util.option('--default-routing-policy', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3137
|
-
@cli_util.option('--hosts', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are \"www.example.com\", \"*.example.com\", \"*.com\". Can be omitted if the virtual service will only have TCP virtual deployments.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3138
|
-
@cli_util.option('--mtls', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3139
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3140
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3141
|
-
@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.""")
|
|
3142
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
3143
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
3144
|
-
@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.""")
|
|
3145
|
-
@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.""")
|
|
3146
|
-
@json_skeleton_utils.get_cli_json_input_option({'default-routing-policy': {'module': 'service_mesh', 'class': 'DefaultVirtualServiceRoutingPolicy'}, 'hosts': {'module': 'service_mesh', 'class': 'list[string]'}, 'mtls': {'module': 'service_mesh', 'class': 'VirtualServiceMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
3147
|
-
@cli_util.help_option
|
|
3148
|
-
@click.pass_context
|
|
3149
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'default-routing-policy': {'module': 'service_mesh', 'class': 'DefaultVirtualServiceRoutingPolicy'}, 'hosts': {'module': 'service_mesh', 'class': 'list[string]'}, 'mtls': {'module': 'service_mesh', 'class': 'VirtualServiceMutualTransportLayerSecurityDetails'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
3150
|
-
@cli_util.wrap_exceptions
|
|
3151
|
-
def update_virtual_service(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_id, description, default_routing_policy, hosts, mtls, freeform_tags, defined_tags, if_match):
|
|
3152
|
-
|
|
3153
|
-
if isinstance(virtual_service_id, six.string_types) and len(virtual_service_id.strip()) == 0:
|
|
3154
|
-
raise click.UsageError('Parameter --virtual-service-id cannot be whitespace or empty string')
|
|
3155
|
-
if not force:
|
|
3156
|
-
if default_routing_policy or hosts or mtls or freeform_tags or defined_tags:
|
|
3157
|
-
if not click.confirm("WARNING: Updates to default-routing-policy and hosts and mtls and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
3158
|
-
ctx.abort()
|
|
3159
|
-
|
|
3160
|
-
kwargs = {}
|
|
3161
|
-
if if_match is not None:
|
|
3162
|
-
kwargs['if_match'] = if_match
|
|
3163
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
3164
|
-
|
|
3165
|
-
_details = {}
|
|
3166
|
-
|
|
3167
|
-
if description is not None:
|
|
3168
|
-
_details['description'] = description
|
|
3169
|
-
|
|
3170
|
-
if default_routing_policy is not None:
|
|
3171
|
-
_details['defaultRoutingPolicy'] = cli_util.parse_json_parameter("default_routing_policy", default_routing_policy)
|
|
3172
|
-
|
|
3173
|
-
if hosts is not None:
|
|
3174
|
-
_details['hosts'] = cli_util.parse_json_parameter("hosts", hosts)
|
|
3175
|
-
|
|
3176
|
-
if mtls is not None:
|
|
3177
|
-
_details['mtls'] = cli_util.parse_json_parameter("mtls", mtls)
|
|
3178
|
-
|
|
3179
|
-
if freeform_tags is not None:
|
|
3180
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
3181
|
-
|
|
3182
|
-
if defined_tags is not None:
|
|
3183
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
3184
|
-
|
|
3185
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
3186
|
-
result = client.update_virtual_service(
|
|
3187
|
-
virtual_service_id=virtual_service_id,
|
|
3188
|
-
update_virtual_service_details=_details,
|
|
3189
|
-
**kwargs
|
|
3190
|
-
)
|
|
3191
|
-
if wait_for_state:
|
|
3192
|
-
|
|
3193
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
3194
|
-
try:
|
|
3195
|
-
wait_period_kwargs = {}
|
|
3196
|
-
if max_wait_seconds is not None:
|
|
3197
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
3198
|
-
if wait_interval_seconds is not None:
|
|
3199
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
3200
|
-
if 'opc-work-request-id' not in result.headers:
|
|
3201
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
3202
|
-
cli_util.render_response(result, ctx)
|
|
3203
|
-
return
|
|
3204
|
-
|
|
3205
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
3206
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
3207
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
3208
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
3209
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3210
|
-
cli_util.render_response(result, ctx)
|
|
3211
|
-
sys.exit(2)
|
|
3212
|
-
except Exception:
|
|
3213
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3214
|
-
cli_util.render_response(result, ctx)
|
|
3215
|
-
raise
|
|
3216
|
-
else:
|
|
3217
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
3218
|
-
cli_util.render_response(result, ctx)
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
@virtual_service_route_table_group.command(name=cli_util.override('service_mesh.update_virtual_service_route_table.command_name', 'update'), help=u"""Updates the VirtualServiceRouteTable. \n[Command Reference](updateVirtualServiceRouteTable)""")
|
|
3222
|
-
@cli_util.option('--virtual-service-route-table-id', required=True, help=u"""Unique VirtualServiceRouteTable identifier.""")
|
|
3223
|
-
@cli_util.option('--description', help=u"""Description of the resource. It can be changed after creation. Avoid entering confidential information.
|
|
3224
|
-
|
|
3225
|
-
Example: `This is my new resource`""")
|
|
3226
|
-
@cli_util.option('--priority', type=click.INT, help=u"""The priority of the route table. Lower value means higher priority. The routes are declared based on the priority.""")
|
|
3227
|
-
@cli_util.option('--route-rules', type=custom_types.CLI_COMPLEX_TYPE, help=u"""The route rules for the virtual service.
|
|
3228
|
-
|
|
3229
|
-
This option is a JSON list with items of type VirtualServiceTrafficRouteRuleDetails. For documentation on VirtualServiceTrafficRouteRuleDetails please see our API reference: https://docs.cloud.oracle.com/api/#/en/servicemesh/20220615/datatypes/VirtualServiceTrafficRouteRuleDetails.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3230
|
-
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{\"bar-key\": \"value\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3231
|
-
@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. Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
3232
|
-
@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.""")
|
|
3233
|
-
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
3234
|
-
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "WAITING", "NEEDS_ATTENTION", "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.""")
|
|
3235
|
-
@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.""")
|
|
3236
|
-
@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.""")
|
|
3237
|
-
@json_skeleton_utils.get_cli_json_input_option({'route-rules': {'module': 'service_mesh', 'class': 'list[VirtualServiceTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
3238
|
-
@cli_util.help_option
|
|
3239
|
-
@click.pass_context
|
|
3240
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'route-rules': {'module': 'service_mesh', 'class': 'list[VirtualServiceTrafficRouteRuleDetails]'}, 'freeform-tags': {'module': 'service_mesh', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'service_mesh', 'class': 'dict(str, dict(str, object))'}})
|
|
3241
|
-
@cli_util.wrap_exceptions
|
|
3242
|
-
def update_virtual_service_route_table(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, virtual_service_route_table_id, description, priority, route_rules, freeform_tags, defined_tags, if_match):
|
|
3243
|
-
|
|
3244
|
-
if isinstance(virtual_service_route_table_id, six.string_types) and len(virtual_service_route_table_id.strip()) == 0:
|
|
3245
|
-
raise click.UsageError('Parameter --virtual-service-route-table-id cannot be whitespace or empty string')
|
|
3246
|
-
if not force:
|
|
3247
|
-
if route_rules or freeform_tags or defined_tags:
|
|
3248
|
-
if not click.confirm("WARNING: Updates to route-rules and freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
3249
|
-
ctx.abort()
|
|
3250
|
-
|
|
3251
|
-
kwargs = {}
|
|
3252
|
-
if if_match is not None:
|
|
3253
|
-
kwargs['if_match'] = if_match
|
|
3254
|
-
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
3255
|
-
|
|
3256
|
-
_details = {}
|
|
3257
|
-
|
|
3258
|
-
if description is not None:
|
|
3259
|
-
_details['description'] = description
|
|
3260
|
-
|
|
3261
|
-
if priority is not None:
|
|
3262
|
-
_details['priority'] = priority
|
|
3263
|
-
|
|
3264
|
-
if route_rules is not None:
|
|
3265
|
-
_details['routeRules'] = cli_util.parse_json_parameter("route_rules", route_rules)
|
|
3266
|
-
|
|
3267
|
-
if freeform_tags is not None:
|
|
3268
|
-
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
3269
|
-
|
|
3270
|
-
if defined_tags is not None:
|
|
3271
|
-
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
3272
|
-
|
|
3273
|
-
client = cli_util.build_client('service_mesh', 'service_mesh', ctx)
|
|
3274
|
-
result = client.update_virtual_service_route_table(
|
|
3275
|
-
virtual_service_route_table_id=virtual_service_route_table_id,
|
|
3276
|
-
update_virtual_service_route_table_details=_details,
|
|
3277
|
-
**kwargs
|
|
3278
|
-
)
|
|
3279
|
-
if wait_for_state:
|
|
3280
|
-
|
|
3281
|
-
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
3282
|
-
try:
|
|
3283
|
-
wait_period_kwargs = {}
|
|
3284
|
-
if max_wait_seconds is not None:
|
|
3285
|
-
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
3286
|
-
if wait_interval_seconds is not None:
|
|
3287
|
-
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
3288
|
-
if 'opc-work-request-id' not in result.headers:
|
|
3289
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
3290
|
-
cli_util.render_response(result, ctx)
|
|
3291
|
-
return
|
|
3292
|
-
|
|
3293
|
-
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
3294
|
-
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
3295
|
-
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
3296
|
-
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
3297
|
-
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3298
|
-
cli_util.render_response(result, ctx)
|
|
3299
|
-
sys.exit(2)
|
|
3300
|
-
except Exception:
|
|
3301
|
-
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
3302
|
-
cli_util.render_response(result, ctx)
|
|
3303
|
-
raise
|
|
3304
|
-
else:
|
|
3305
|
-
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
3306
|
-
cli_util.render_response(result, ctx)
|