oci-cli 3.70.0__py3-none-any.whl → 3.70.1__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/bin/artifacts.psm1 +4 -2
- oci_cli/bin/dif.psm1 +53 -0
- oci_cli/bin/limits.psm1 +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/artifacts/container/image/list.txt +8 -0
- oci_cli/help_text_producer/data_files/text/cmdref/artifacts/container/image/lookup.txt +93 -0
- oci_cli/help_text_producer/data_files/text/cmdref/artifacts/container/image.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/artifacts/container.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/artifacts.txt +18 -2
- oci_cli/help_text_producer/data_files/text/cmdref/bv/volume-kms-key/update.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ce/addon-option/list.txt +6 -1
- oci_cli/help_text_producer/data_files/text/cmdref/ce/cluster-options/get.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/ce/node-pool-options/get.txt +24 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create-dedicated-vm-host-compute-bare-metal-host-placement-constraint-details.txt +12 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create-dedicated-vm-host-host-group-placement-constraint-details.txt +12 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create.txt +12 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/list.txt +5 -0
- oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host-instance/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.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/add.txt +227 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/change-compartment.txt +136 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/create.txt +262 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/delete.txt +134 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/deploy-artifacts.txt +198 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/get.txt +96 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/update.txt +274 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack-collection/list-stacks.txt +142 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/stack.txt +31 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request/cancel.txt +103 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request/list.txt +140 -0
- oci_cli/help_text_producer/data_files/text/cmdref/{organizations/work-request-log → dif/work-request-error}/list.txt +22 -9
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request-error.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request-log-entry/list-work-request-logs.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request-log-entry.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif/work-request.txt +23 -0
- oci_cli/help_text_producer/data_files/text/cmdref/dif.txt +49 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/compliance/get.txt +99 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/compliance.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create-fleet-dynamic-resource-selection.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create-fleet-environment-fleet-details.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create-fleet-generic-fleet-details.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create-fleet-group-fleet-details.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create-fleet-manual-resource-selection.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create-fleet-product-fleet-details.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/create.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/update-fleet-dynamic-resource-selection.txt +10 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/update-fleet-manual-resource-selection.txt +10 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet/update.txt +10 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/onboarding/create.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/onboarding/update.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-credential-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-environment-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-lifecycle-operation-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-patch-type-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-product-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-product-stack-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create-platform-configuration-self-hosted-instance-config-category-details.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/create.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-credential-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-environment-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-lifecycle-operation-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-patch-type-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-product-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-product-stack-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update-platform-configuration-self-hosted-instance-config-category-details.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration/update.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/platform-configuration-collection/list-platform-configurations.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/property/create.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-admin/property/update.txt +26 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/configure.txt +218 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/create-catalog-item-catalog-git-source-config.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/create-catalog-item-catalog-marketplace-source-config.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/create-catalog-item-catalog-par-source-config.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/create-catalog-item-catalog-source-template-config.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/create.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item/update.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item-collection/list-catalog-items.txt +9 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item-variables-definition/get.txt +97 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item-variables-definition.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog/catalog-item.txt +2 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-catalog.txt +6 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/installed-patch-collection/list-installed-patches.txt +152 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/installed-patch-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/inventory-record-collection/list-inventory-records.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/job-activity/get.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/recommended-patch-collection/list-recommended-patches.txt +159 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/recommended-patch-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/report-collection/report.txt +180 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/report-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/report-metadata-collection/list-report-metadata.txt +133 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/report-metadata-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/scheduler-execution-collection/list-scheduler-executions.txt +13 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/target-component-collection/list-target-components.txt +147 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/target-component-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/target-property-collection/list-target-properties.txt +143 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations/target-property-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-operations.txt +24 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/import-runbook-details/import-runbook.txt +187 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/import-runbook-details.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/import-runbook-precheck-details/import-runbook-precheck.txt +182 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/import-runbook-precheck-details.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/import-runbook-version-details/import-runbook-version.txt +183 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/import-runbook-version-details.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook/export-runbook-transfer-runbook-object-storage-bucket-content-details.txt +160 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook/export-runbook-transfer-runbook-par-url-content-details.txt +147 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook/export-runbook-version-transfer-runbook-object-storage-bucket-content-details.txt +147 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook/export-runbook-version-transfer-runbook-par-url-content-details.txt +134 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook/export-runbook-version.txt +145 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook/export.txt +155 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-export/get.txt +105 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-export-dependency-collection/find-runbook-export-dependency.txt +114 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-export-dependency-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-export-status-collection/list-runbook-export-statuses.txt +135 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-export-status-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-export.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import/get.txt +105 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import-dependency-collection/find-runbook-import-dependency-transfer-runbook-object-storage-bucket-content-details.txt +119 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import-dependency-collection/find-runbook-import-dependency-transfer-runbook-par-url-content-details.txt +106 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import-dependency-collection/find-runbook-import-dependency.txt +117 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import-dependency-collection.txt +21 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import-status-collection/list-runbook-import-statuses.txt +135 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import-status-collection.txt +15 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-import.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-version/create.txt +5 -4
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-version/update.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook-version.txt +4 -1
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks/runbook.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-apps-management-runbooks.txt +56 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-target-collection/list-fleet-targets.txt +9 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management/fleet-target-collection/list-targets.txt +4 -0
- oci_cli/help_text_producer/data_files/text/cmdref/fleet-apps-management.txt +90 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/dedicated-ai-cluster/create.txt +10 -1
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model/change-compartment.txt +106 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model/create-from-huggingface.txt +213 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model/create-from-objectstorage.txt +203 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model/delete.txt +131 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model/get.txt +91 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model/update.txt +183 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model-collection/list-imported-models.txt +161 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model-collection.txt +14 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/imported-model.txt +30 -0
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai/model-collection/list-models.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/generative-ai.txt +18 -0
- oci_cli/help_text_producer/data_files/text/cmdref/limits/definition/list.txt +5 -5
- oci_cli/help_text_producer/data_files/text/cmdref/limits/resource-availability/get.txt +9 -5
- oci_cli/help_text_producer/data_files/text/cmdref/limits/service/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/limits/value/list.txt +7 -3
- oci_cli/help_text_producer/data_files/text/cmdref/ocvs/work-request-error/{list-errors.txt → list.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-errors.txt → list.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/work-request-log-entry/list.txt +100 -0
- oci_cli/help_text_producer/data_files/text/cmdref/organizations/{work-request-log.txt → work-request-log-entry.txt} +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
- oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
- oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
- oci_cli/help_text_producer/data_files/text/index.txt +2 -0
- oci_cli/service_mapping.py +5 -0
- oci_cli/version.py +1 -1
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/METADATA +2 -2
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/RECORD +196 -114
- services/artifacts/src/oci_cli_artifacts/artifacts_cli_extended.py +4 -0
- services/artifacts/src/oci_cli_artifacts/generated/artifacts_cli.py +36 -3
- services/container_engine/src/oci_cli_container_engine/generated/containerengine_cli.py +18 -3
- services/core/src/oci_cli_blockstorage/generated/blockstorage_cli.py +4 -1
- services/core/src/oci_cli_compute/generated/compute_cli.py +35 -5
- services/dif/__init__.py +4 -0
- services/dif/src/__init__.py +4 -0
- services/dif/src/oci_cli_stack/__init__.py +4 -0
- services/dif/src/oci_cli_stack/generated/__init__.py +4 -0
- services/dif/src/oci_cli_stack/generated/client_mappings.py +14 -0
- services/dif/src/oci_cli_stack/generated/stack_cli.py +887 -0
- services/dif/src/oci_cli_stack/stack_cli_extended.py +51 -0
- services/dif/tests/__init__.py +4 -0
- services/fleet_apps_management/src/oci_cli_fleet_apps_management/generated/fleetappsmanagement_cli.py +63 -15
- services/fleet_apps_management/src/oci_cli_fleet_apps_management_admin/generated/fleetappsmanagementadmin_cli.py +265 -65
- services/fleet_apps_management/src/oci_cli_fleet_apps_management_catalog/generated/fleetappsmanagementcatalog_cli.py +154 -7
- services/fleet_apps_management/src/oci_cli_fleet_apps_management_operations/generated/fleetappsmanagementoperations_cli.py +473 -31
- services/fleet_apps_management/src/oci_cli_fleet_apps_management_runbooks/generated/fleetappsmanagementrunbooks_cli.py +1055 -34
- services/generative_ai/src/oci_cli_generative_ai/generated/generativeai_cli.py +640 -59
- services/generative_ai/src/oci_cli_generative_ai/generativeai_cli_extended.py +107 -0
- services/limits/src/oci_cli_limits/generated/limits_cli.py +15 -9
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/LICENSE.txt +0 -0
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/WHEEL +0 -0
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/entry_points.txt +0 -0
- {oci_cli-3.70.0.dist-info → oci_cli-3.70.1.dist-info}/top_level.txt +0 -0
|
@@ -28,37 +28,57 @@ def generative_ai_root_group():
|
|
|
28
28
|
pass
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
@click.command(cli_util.override('generative_ai.
|
|
31
|
+
@click.command(cli_util.override('generative_ai.endpoint_collection_group.command_name', 'endpoint-collection'), cls=CommandGroupWithAlias, help="""Results of an endpoint search. Contains EndpointSummary items and other information such as metadata.""")
|
|
32
|
+
@cli_util.help_option_group
|
|
33
|
+
def endpoint_collection_group():
|
|
34
|
+
pass
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
|
|
37
|
+
@click.command(cli_util.override('generative_ai.work_request_log_entry_group.command_name', 'work-request-log-entry'), cls=CommandGroupWithAlias, help="""The log message from performing an operation that is tracked by this work request.""")
|
|
34
38
|
@cli_util.help_option_group
|
|
35
|
-
def
|
|
39
|
+
def work_request_log_entry_group():
|
|
36
40
|
pass
|
|
37
41
|
|
|
38
42
|
|
|
39
|
-
@click.command(cli_util.override('generative_ai.
|
|
43
|
+
@click.command(cli_util.override('generative_ai.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""An asynchronous work request. When you start a long-running operation, the service creates a work request. Work requests help you monitor long-running operations.
|
|
44
|
+
|
|
45
|
+
A work request is an activity log that lets you track each step in the operation's progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation.""")
|
|
40
46
|
@cli_util.help_option_group
|
|
41
|
-
def
|
|
47
|
+
def work_request_group():
|
|
42
48
|
pass
|
|
43
49
|
|
|
44
50
|
|
|
45
|
-
@click.command(cli_util.override('generative_ai.
|
|
51
|
+
@click.command(cli_util.override('generative_ai.model_collection_group.command_name', 'model-collection'), cls=CommandGroupWithAlias, help="""Results of a model search. Contains ModelSummary items and other information such as metadata.""")
|
|
46
52
|
@cli_util.help_option_group
|
|
47
|
-
def
|
|
53
|
+
def model_collection_group():
|
|
48
54
|
pass
|
|
49
55
|
|
|
50
56
|
|
|
51
|
-
@click.command(cli_util.override('generative_ai.
|
|
57
|
+
@click.command(cli_util.override('generative_ai.generative_ai_private_endpoint_group.command_name', 'generative-ai-private-endpoint'), cls=CommandGroupWithAlias, help="""Generative AI private endpoint.""")
|
|
58
|
+
@cli_util.help_option_group
|
|
59
|
+
def generative_ai_private_endpoint_group():
|
|
60
|
+
pass
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@click.command(cli_util.override('generative_ai.endpoint_group.command_name', 'endpoint'), cls=CommandGroupWithAlias, help="""To host a custom model for inference, create an endpoint for that model on a dedicated AI cluster of type HOSTING.
|
|
52
64
|
|
|
53
65
|
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See [Getting Started with Policies] and [Getting Access to Generative AI Resources].""")
|
|
54
66
|
@cli_util.help_option_group
|
|
55
|
-
def
|
|
67
|
+
def endpoint_group():
|
|
56
68
|
pass
|
|
57
69
|
|
|
58
70
|
|
|
59
|
-
@click.command(cli_util.override('generative_ai.
|
|
71
|
+
@click.command(cli_util.override('generative_ai.work_request_error_group.command_name', 'work-request-error'), cls=CommandGroupWithAlias, help="""An error encountered while performing an operation that is tracked by this work request.""")
|
|
60
72
|
@cli_util.help_option_group
|
|
61
|
-
def
|
|
73
|
+
def work_request_error_group():
|
|
74
|
+
pass
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
@click.command(cli_util.override('generative_ai.model_group.command_name', 'model'), cls=CommandGroupWithAlias, help="""You can create a custom model by using your dataset to fine-tune an out-of-the-box text generation base model. Have your dataset ready before you create a custom model. See [Training Data Requirements].
|
|
78
|
+
|
|
79
|
+
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See [Getting Started with Policies] and [Getting Access to Generative AI Resources].""")
|
|
80
|
+
@cli_util.help_option_group
|
|
81
|
+
def model_group():
|
|
62
82
|
pass
|
|
63
83
|
|
|
64
84
|
|
|
@@ -76,43 +96,39 @@ def dedicated_ai_cluster_group():
|
|
|
76
96
|
pass
|
|
77
97
|
|
|
78
98
|
|
|
79
|
-
@click.command(cli_util.override('generative_ai.work_request_group.command_name', 'work-request'), cls=CommandGroupWithAlias, help="""An asynchronous work request. When you start a long-running operation, the service creates a work request. Work requests help you monitor long-running operations.
|
|
80
|
-
|
|
81
|
-
A work request is an activity log that lets you track each step in the operation's progress. Each work request has an OCID that lets you interact with it programmatically and use it for automation.""")
|
|
82
|
-
@cli_util.help_option_group
|
|
83
|
-
def work_request_group():
|
|
84
|
-
pass
|
|
85
|
-
|
|
86
|
-
|
|
87
99
|
@click.command(cli_util.override('generative_ai.generative_ai_private_endpoint_collection_group.command_name', 'generative-ai-private-endpoint-collection'), cls=CommandGroupWithAlias, help="""Collection of GenerativeAiPrivateEndpointSummary""")
|
|
88
100
|
@cli_util.help_option_group
|
|
89
101
|
def generative_ai_private_endpoint_collection_group():
|
|
90
102
|
pass
|
|
91
103
|
|
|
92
104
|
|
|
93
|
-
@click.command(cli_util.override('generative_ai.
|
|
105
|
+
@click.command(cli_util.override('generative_ai.imported_model_collection_group.command_name', 'imported-model-collection'), cls=CommandGroupWithAlias, help="""Represents the result of a list operation for imported models.""")
|
|
94
106
|
@cli_util.help_option_group
|
|
95
|
-
def
|
|
107
|
+
def imported_model_collection_group():
|
|
96
108
|
pass
|
|
97
109
|
|
|
98
110
|
|
|
99
|
-
@click.command(cli_util.override('generative_ai.
|
|
111
|
+
@click.command(cli_util.override('generative_ai.imported_model_group.command_name', 'imported-model'), cls=CommandGroupWithAlias, help="""Represents a model imported into the system based on an external data source, such as Hugging Face or Object Storage.
|
|
112
|
+
|
|
113
|
+
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator who gives OCI resource access to users. See [Getting Started with Policies] and [Getting Access to Generative AI Resources].""")
|
|
100
114
|
@cli_util.help_option_group
|
|
101
|
-
def
|
|
115
|
+
def imported_model_group():
|
|
102
116
|
pass
|
|
103
117
|
|
|
104
118
|
|
|
105
|
-
generative_ai_root_group.add_command(endpoint_group)
|
|
106
119
|
generative_ai_root_group.add_command(endpoint_collection_group)
|
|
120
|
+
generative_ai_root_group.add_command(work_request_log_entry_group)
|
|
121
|
+
generative_ai_root_group.add_command(work_request_group)
|
|
122
|
+
generative_ai_root_group.add_command(model_collection_group)
|
|
123
|
+
generative_ai_root_group.add_command(generative_ai_private_endpoint_group)
|
|
124
|
+
generative_ai_root_group.add_command(endpoint_group)
|
|
107
125
|
generative_ai_root_group.add_command(work_request_error_group)
|
|
108
126
|
generative_ai_root_group.add_command(model_group)
|
|
109
|
-
generative_ai_root_group.add_command(work_request_log_entry_group)
|
|
110
127
|
generative_ai_root_group.add_command(dedicated_ai_cluster_collection_group)
|
|
111
128
|
generative_ai_root_group.add_command(dedicated_ai_cluster_group)
|
|
112
|
-
generative_ai_root_group.add_command(work_request_group)
|
|
113
129
|
generative_ai_root_group.add_command(generative_ai_private_endpoint_collection_group)
|
|
114
|
-
generative_ai_root_group.add_command(
|
|
115
|
-
generative_ai_root_group.add_command(
|
|
130
|
+
generative_ai_root_group.add_command(imported_model_collection_group)
|
|
131
|
+
generative_ai_root_group.add_command(imported_model_group)
|
|
116
132
|
|
|
117
133
|
|
|
118
134
|
@dedicated_ai_cluster_group.command(name=cli_util.override('generative_ai.change_dedicated_ai_cluster_compartment.command_name', 'change-compartment'), help=u"""Moves a dedicated AI cluster into a different compartment within the same tenancy. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeDedicatedAiClusterCompartment)""")
|
|
@@ -238,6 +254,37 @@ def change_generative_ai_private_endpoint_compartment(ctx, from_json, wait_for_s
|
|
|
238
254
|
cli_util.render_response(result, ctx)
|
|
239
255
|
|
|
240
256
|
|
|
257
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.change_imported_model_compartment.command_name', 'change-compartment'), help=u"""Moves an imported model into a different compartment. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeImportedModelCompartment)""")
|
|
258
|
+
@cli_util.option('--imported-model-id', required=True, help=u"""The importedModel OCID""")
|
|
259
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The destination compartment OCID""")
|
|
260
|
+
@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.""")
|
|
261
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
262
|
+
@cli_util.help_option
|
|
263
|
+
@click.pass_context
|
|
264
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
265
|
+
@cli_util.wrap_exceptions
|
|
266
|
+
def change_imported_model_compartment(ctx, from_json, imported_model_id, compartment_id, if_match):
|
|
267
|
+
|
|
268
|
+
if isinstance(imported_model_id, six.string_types) and len(imported_model_id.strip()) == 0:
|
|
269
|
+
raise click.UsageError('Parameter --imported-model-id cannot be whitespace or empty string')
|
|
270
|
+
|
|
271
|
+
kwargs = {}
|
|
272
|
+
if if_match is not None:
|
|
273
|
+
kwargs['if_match'] = if_match
|
|
274
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
275
|
+
|
|
276
|
+
_details = {}
|
|
277
|
+
_details['compartmentId'] = compartment_id
|
|
278
|
+
|
|
279
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
280
|
+
result = client.change_imported_model_compartment(
|
|
281
|
+
imported_model_id=imported_model_id,
|
|
282
|
+
change_imported_model_compartment_details=_details,
|
|
283
|
+
**kwargs
|
|
284
|
+
)
|
|
285
|
+
cli_util.render_response(result, ctx)
|
|
286
|
+
|
|
287
|
+
|
|
241
288
|
@model_group.command(name=cli_util.override('generative_ai.change_model_compartment.command_name', 'change-compartment'), help=u"""Moves a custom model into a different compartment. For information about moving resources between compartments, see [Moving Resources to a Different Compartment]. \n[Command Reference](changeModelCompartment)""")
|
|
242
289
|
@cli_util.option('--model-id', required=True, help=u"""The model OCID""")
|
|
243
290
|
@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID to create the model in.""")
|
|
@@ -277,7 +324,9 @@ Allowed values are: - HOSTING - FINE_TUNING""")
|
|
|
277
324
|
@cli_util.option('--unit-count', required=True, type=click.INT, help=u"""The number of dedicated units in this AI cluster.""")
|
|
278
325
|
@cli_util.option('--unit-shape', required=True, help=u"""The shape of dedicated unit in this AI cluster. The underlying hardware configuration is hidden from customers.
|
|
279
326
|
|
|
280
|
-
Allowed values are: - LARGE_COHERE - LARGE_COHERE_V2 - SMALL_COHERE - SMALL_COHERE_V2 - SMALL_COHERE_4 - EMBED_COHERE - LLAMA2_70 - LARGE_GENERIC - LARGE_COHERE_V2_2 - LARGE_GENERIC_4 - SMALL_GENERIC_V2 - LARGE_GENERIC_2 - LARGE_COHERE_V3 - RERANK_COHERE - SMALL_GENERIC_V1 - MEDIUM_GENERIC_V1 - LARGE_GENERIC_V1
|
|
327
|
+
Allowed values are: - LARGE_COHERE - LARGE_COHERE_V2 - SMALL_COHERE - SMALL_COHERE_V2 - SMALL_COHERE_4 - EMBED_COHERE - LLAMA2_70 - LARGE_GENERIC - LARGE_COHERE_V2_2 - LARGE_GENERIC_4 - SMALL_GENERIC_V2 - LARGE_GENERIC_2 - LARGE_COHERE_V3 - RERANK_COHERE - SMALL_GENERIC_V1 - MEDIUM_GENERIC_V1 - LARGE_GENERIC_V1 - A10_X1 - A10_X2 - A10_X4 - A100_40G_X1 - A100_40G_X2 - A100_40G_X4 - A100_40G_X8 - A100_80G_X1 - A100_80G_X2 - A100_80G_X4 - A100_80G_X8 - H100_X1 - H100_X2 - H100_X4 - H100_X8 - H200_X1 - H200_X2 - H200_X4 - H200_X8
|
|
328
|
+
|
|
329
|
+
The following shapes can only be used to deploy imported models: - A10_X1, A10_X2, A10_X4 - A100_40G_X1, A100_40G_X2, A100_40G_X4, A100_40G_X8 - A100_80G_X1, A100_80G_X2, A100_80G_X4, A100_80G_X8 - H100_X1, H100_X2, H100_X4, H100_X8 - H200_X1, H200_X2, H200_X4, H200_X8""")
|
|
281
330
|
@cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable.""")
|
|
282
331
|
@cli_util.option('--description', help=u"""An optional description of the dedicated AI cluster.""")
|
|
283
332
|
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
@@ -371,20 +420,282 @@ Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_comp
|
|
|
371
420
|
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
372
421
|
@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.""")
|
|
373
422
|
@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.""")
|
|
374
|
-
@json_skeleton_utils.get_cli_json_input_option({'content-moderation-config': {'module': 'generative_ai', 'class': 'ContentModerationConfig'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
423
|
+
@json_skeleton_utils.get_cli_json_input_option({'content-moderation-config': {'module': 'generative_ai', 'class': 'ContentModerationConfig'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
424
|
+
@cli_util.help_option
|
|
425
|
+
@click.pass_context
|
|
426
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'content-moderation-config': {'module': 'generative_ai', 'class': 'ContentModerationConfig'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'Endpoint'})
|
|
427
|
+
@cli_util.wrap_exceptions
|
|
428
|
+
def create_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, model_id, dedicated_ai_cluster_id, display_name, description, generative_ai_private_endpoint_id, content_moderation_config, freeform_tags, defined_tags):
|
|
429
|
+
|
|
430
|
+
kwargs = {}
|
|
431
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
432
|
+
|
|
433
|
+
_details = {}
|
|
434
|
+
_details['compartmentId'] = compartment_id
|
|
435
|
+
_details['modelId'] = model_id
|
|
436
|
+
_details['dedicatedAiClusterId'] = dedicated_ai_cluster_id
|
|
437
|
+
|
|
438
|
+
if display_name is not None:
|
|
439
|
+
_details['displayName'] = display_name
|
|
440
|
+
|
|
441
|
+
if description is not None:
|
|
442
|
+
_details['description'] = description
|
|
443
|
+
|
|
444
|
+
if generative_ai_private_endpoint_id is not None:
|
|
445
|
+
_details['generativeAiPrivateEndpointId'] = generative_ai_private_endpoint_id
|
|
446
|
+
|
|
447
|
+
if content_moderation_config is not None:
|
|
448
|
+
_details['contentModerationConfig'] = cli_util.parse_json_parameter("content_moderation_config", content_moderation_config)
|
|
449
|
+
|
|
450
|
+
if freeform_tags is not None:
|
|
451
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
452
|
+
|
|
453
|
+
if defined_tags is not None:
|
|
454
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
455
|
+
|
|
456
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
457
|
+
result = client.create_endpoint(
|
|
458
|
+
create_endpoint_details=_details,
|
|
459
|
+
**kwargs
|
|
460
|
+
)
|
|
461
|
+
if wait_for_state:
|
|
462
|
+
|
|
463
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
464
|
+
try:
|
|
465
|
+
wait_period_kwargs = {}
|
|
466
|
+
if max_wait_seconds is not None:
|
|
467
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
468
|
+
if wait_interval_seconds is not None:
|
|
469
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
470
|
+
if 'opc-work-request-id' not in result.headers:
|
|
471
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
472
|
+
cli_util.render_response(result, ctx)
|
|
473
|
+
return
|
|
474
|
+
|
|
475
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
476
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
477
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
478
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
479
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
480
|
+
cli_util.render_response(result, ctx)
|
|
481
|
+
sys.exit(2)
|
|
482
|
+
except Exception:
|
|
483
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
484
|
+
cli_util.render_response(result, ctx)
|
|
485
|
+
raise
|
|
486
|
+
else:
|
|
487
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
488
|
+
cli_util.render_response(result, ctx)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
@generative_ai_private_endpoint_group.command(name=cli_util.override('generative_ai.create_generative_ai_private_endpoint.command_name', 'create'), help=u"""Creates a Generative AI private endpoint. \n[Command Reference](createGenerativeAiPrivateEndpoint)""")
|
|
492
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The OCID of the compartment where the private endpoint is created.""")
|
|
493
|
+
@cli_util.option('--subnet-id', required=True, help=u"""The OCID of the customer's subnet where the private endpoint VNIC will reside.""")
|
|
494
|
+
@cli_util.option('--dns-prefix', required=True, help=u"""dnsPrefix of the private endpoint FQDN.""")
|
|
495
|
+
@cli_util.option('--description', help=u"""A description of this private endpoint.""")
|
|
496
|
+
@cli_util.option('--display-name', help=u"""A user friendly name. It doesn't have to be unique. Avoid entering confidential information.""")
|
|
497
|
+
@cli_util.option('--nsg-ids', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of the OCIDs of the network security groups (NSGs) to add the private endpoint's VNIC to.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
498
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
499
|
+
|
|
500
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
501
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
502
|
+
|
|
503
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
504
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
505
|
+
@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.""")
|
|
506
|
+
@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.""")
|
|
507
|
+
@json_skeleton_utils.get_cli_json_input_option({'nsg-ids': {'module': 'generative_ai', 'class': 'list[string]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
508
|
+
@cli_util.help_option
|
|
509
|
+
@click.pass_context
|
|
510
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'nsg-ids': {'module': 'generative_ai', 'class': 'list[string]'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'GenerativeAiPrivateEndpoint'})
|
|
511
|
+
@cli_util.wrap_exceptions
|
|
512
|
+
def create_generative_ai_private_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, subnet_id, dns_prefix, description, display_name, nsg_ids, freeform_tags, defined_tags):
|
|
513
|
+
|
|
514
|
+
kwargs = {}
|
|
515
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
516
|
+
|
|
517
|
+
_details = {}
|
|
518
|
+
_details['compartmentId'] = compartment_id
|
|
519
|
+
_details['subnetId'] = subnet_id
|
|
520
|
+
_details['dnsPrefix'] = dns_prefix
|
|
521
|
+
|
|
522
|
+
if description is not None:
|
|
523
|
+
_details['description'] = description
|
|
524
|
+
|
|
525
|
+
if display_name is not None:
|
|
526
|
+
_details['displayName'] = display_name
|
|
527
|
+
|
|
528
|
+
if nsg_ids is not None:
|
|
529
|
+
_details['nsgIds'] = cli_util.parse_json_parameter("nsg_ids", nsg_ids)
|
|
530
|
+
|
|
531
|
+
if freeform_tags is not None:
|
|
532
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
533
|
+
|
|
534
|
+
if defined_tags is not None:
|
|
535
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
536
|
+
|
|
537
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
538
|
+
result = client.create_generative_ai_private_endpoint(
|
|
539
|
+
create_generative_ai_private_endpoint_details=_details,
|
|
540
|
+
**kwargs
|
|
541
|
+
)
|
|
542
|
+
if wait_for_state:
|
|
543
|
+
|
|
544
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
545
|
+
try:
|
|
546
|
+
wait_period_kwargs = {}
|
|
547
|
+
if max_wait_seconds is not None:
|
|
548
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
549
|
+
if wait_interval_seconds is not None:
|
|
550
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
551
|
+
if 'opc-work-request-id' not in result.headers:
|
|
552
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
553
|
+
cli_util.render_response(result, ctx)
|
|
554
|
+
return
|
|
555
|
+
|
|
556
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
557
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
558
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
559
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
560
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
561
|
+
cli_util.render_response(result, ctx)
|
|
562
|
+
sys.exit(2)
|
|
563
|
+
except Exception:
|
|
564
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
565
|
+
cli_util.render_response(result, ctx)
|
|
566
|
+
raise
|
|
567
|
+
else:
|
|
568
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
569
|
+
cli_util.render_response(result, ctx)
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.create_imported_model.command_name', 'create'), help=u"""Import a model from ModelDataSource.
|
|
573
|
+
|
|
574
|
+
The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the importedModel creation progress. \n[Command Reference](createImportedModel)""")
|
|
575
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID from which the model is imported.""")
|
|
576
|
+
@cli_util.option('--data-source', required=True, type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
577
|
+
@cli_util.option('--display-name', help=u"""A user-friendly name for the imported model.""")
|
|
578
|
+
@cli_util.option('--description', help=u"""An optional description of the imported model.""")
|
|
579
|
+
@cli_util.option('--vendor', help=u"""The provider of the imported model.""")
|
|
580
|
+
@cli_util.option('--version-parameterconflict', help=u"""The version of the imported model.""")
|
|
581
|
+
@cli_util.option('--capabilities', type=custom_types.CliCaseInsensitiveChoice(["TEXT_TO_TEXT", "IMAGE_TEXT_TO_TEXT", "EMBEDDING", "RERANK"]), help=u"""Specifies the intended use or supported capabilities of the imported model.""")
|
|
582
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
583
|
+
|
|
584
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
585
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
586
|
+
|
|
587
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
588
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
589
|
+
@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.""")
|
|
590
|
+
@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.""")
|
|
591
|
+
@json_skeleton_utils.get_cli_json_input_option({'data-source': {'module': 'generative_ai', 'class': 'ModelDataSource'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
592
|
+
@cli_util.help_option
|
|
593
|
+
@click.pass_context
|
|
594
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'data-source': {'module': 'generative_ai', 'class': 'ModelDataSource'}, 'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'ImportedModel'})
|
|
595
|
+
@cli_util.wrap_exceptions
|
|
596
|
+
def create_imported_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, data_source, display_name, description, vendor, version_parameterconflict, capabilities, freeform_tags, defined_tags):
|
|
597
|
+
|
|
598
|
+
kwargs = {}
|
|
599
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
600
|
+
|
|
601
|
+
_details = {}
|
|
602
|
+
_details['compartmentId'] = compartment_id
|
|
603
|
+
_details['dataSource'] = cli_util.parse_json_parameter("data_source", data_source)
|
|
604
|
+
|
|
605
|
+
if display_name is not None:
|
|
606
|
+
_details['displayName'] = display_name
|
|
607
|
+
|
|
608
|
+
if description is not None:
|
|
609
|
+
_details['description'] = description
|
|
610
|
+
|
|
611
|
+
if vendor is not None:
|
|
612
|
+
_details['vendor'] = vendor
|
|
613
|
+
|
|
614
|
+
if version_parameterconflict is not None:
|
|
615
|
+
_details['version'] = version_parameterconflict
|
|
616
|
+
|
|
617
|
+
if capabilities is not None:
|
|
618
|
+
_details['capabilities'] = cli_util.parse_json_parameter("capabilities", capabilities)
|
|
619
|
+
|
|
620
|
+
if freeform_tags is not None:
|
|
621
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
622
|
+
|
|
623
|
+
if defined_tags is not None:
|
|
624
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
625
|
+
|
|
626
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
627
|
+
result = client.create_imported_model(
|
|
628
|
+
create_imported_model_details=_details,
|
|
629
|
+
**kwargs
|
|
630
|
+
)
|
|
631
|
+
if wait_for_state:
|
|
632
|
+
|
|
633
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
634
|
+
try:
|
|
635
|
+
wait_period_kwargs = {}
|
|
636
|
+
if max_wait_seconds is not None:
|
|
637
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
638
|
+
if wait_interval_seconds is not None:
|
|
639
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
640
|
+
if 'opc-work-request-id' not in result.headers:
|
|
641
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
642
|
+
cli_util.render_response(result, ctx)
|
|
643
|
+
return
|
|
644
|
+
|
|
645
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
646
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
647
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
648
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
649
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
650
|
+
cli_util.render_response(result, ctx)
|
|
651
|
+
sys.exit(2)
|
|
652
|
+
except Exception:
|
|
653
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
654
|
+
cli_util.render_response(result, ctx)
|
|
655
|
+
raise
|
|
656
|
+
else:
|
|
657
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
658
|
+
cli_util.render_response(result, ctx)
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.create_imported_model_object_storage_object.command_name', 'create-imported-model-object-storage-object'), help=u"""Import a model from ModelDataSource.
|
|
662
|
+
|
|
663
|
+
The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the importedModel creation progress. \n[Command Reference](createImportedModel)""")
|
|
664
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID from which the model is imported.""")
|
|
665
|
+
@cli_util.option('--data-source-namespace-name', required=True, help=u"""The namespace of the Object Storage where the files are stored.""")
|
|
666
|
+
@cli_util.option('--data-source-bucket-name', required=True, help=u"""The name of the Object Storage bucket.""")
|
|
667
|
+
@cli_util.option('--data-source-prefix-name', required=True, help=u"""The prefix path (or folder) within the bucket where files are located.""")
|
|
668
|
+
@cli_util.option('--display-name', help=u"""A user-friendly name for the imported model.""")
|
|
669
|
+
@cli_util.option('--description', help=u"""An optional description of the imported model.""")
|
|
670
|
+
@cli_util.option('--vendor', help=u"""The provider of the imported model.""")
|
|
671
|
+
@cli_util.option('--version-parameterconflict', help=u"""The version of the imported model.""")
|
|
672
|
+
@cli_util.option('--capabilities', type=custom_types.CliCaseInsensitiveChoice(["TEXT_TO_TEXT", "IMAGE_TEXT_TO_TEXT", "EMBEDDING", "RERANK"]), help=u"""Specifies the intended use or supported capabilities of the imported model.""")
|
|
673
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
674
|
+
|
|
675
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
676
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
677
|
+
|
|
678
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
679
|
+
@cli_util.option('--data-source-region', help=u"""The full canonical Oracle Cloud region identifier (e.g., \"us-ashburn-1\") where the object storage bucket containing the files resides.""")
|
|
680
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
681
|
+
@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.""")
|
|
682
|
+
@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.""")
|
|
683
|
+
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
375
684
|
@cli_util.help_option
|
|
376
685
|
@click.pass_context
|
|
377
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'
|
|
686
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'ImportedModel'})
|
|
378
687
|
@cli_util.wrap_exceptions
|
|
379
|
-
def
|
|
688
|
+
def create_imported_model_object_storage_object(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, data_source_namespace_name, data_source_bucket_name, data_source_prefix_name, display_name, description, vendor, version_parameterconflict, capabilities, freeform_tags, defined_tags, data_source_region):
|
|
380
689
|
|
|
381
690
|
kwargs = {}
|
|
382
691
|
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
383
692
|
|
|
384
693
|
_details = {}
|
|
694
|
+
_details['dataSource'] = {}
|
|
385
695
|
_details['compartmentId'] = compartment_id
|
|
386
|
-
_details['
|
|
387
|
-
_details['
|
|
696
|
+
_details['dataSource']['namespaceName'] = data_source_namespace_name
|
|
697
|
+
_details['dataSource']['bucketName'] = data_source_bucket_name
|
|
698
|
+
_details['dataSource']['prefixName'] = data_source_prefix_name
|
|
388
699
|
|
|
389
700
|
if display_name is not None:
|
|
390
701
|
_details['displayName'] = display_name
|
|
@@ -392,11 +703,14 @@ def create_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
|
|
|
392
703
|
if description is not None:
|
|
393
704
|
_details['description'] = description
|
|
394
705
|
|
|
395
|
-
if
|
|
396
|
-
_details['
|
|
706
|
+
if vendor is not None:
|
|
707
|
+
_details['vendor'] = vendor
|
|
397
708
|
|
|
398
|
-
if
|
|
399
|
-
_details['
|
|
709
|
+
if version_parameterconflict is not None:
|
|
710
|
+
_details['version'] = version_parameterconflict
|
|
711
|
+
|
|
712
|
+
if capabilities is not None:
|
|
713
|
+
_details['capabilities'] = cli_util.parse_json_parameter("capabilities", capabilities)
|
|
400
714
|
|
|
401
715
|
if freeform_tags is not None:
|
|
402
716
|
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
@@ -404,9 +718,14 @@ def create_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
|
|
|
404
718
|
if defined_tags is not None:
|
|
405
719
|
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
406
720
|
|
|
721
|
+
if data_source_region is not None:
|
|
722
|
+
_details['dataSource']['region'] = data_source_region
|
|
723
|
+
|
|
724
|
+
_details['dataSource']['sourceType'] = 'OBJECT_STORAGE_OBJECT'
|
|
725
|
+
|
|
407
726
|
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
408
|
-
result = client.
|
|
409
|
-
|
|
727
|
+
result = client.create_imported_model(
|
|
728
|
+
create_imported_model_details=_details,
|
|
410
729
|
**kwargs
|
|
411
730
|
)
|
|
412
731
|
if wait_for_state:
|
|
@@ -439,45 +758,57 @@ def create_endpoint(ctx, from_json, wait_for_state, max_wait_seconds, wait_inter
|
|
|
439
758
|
cli_util.render_response(result, ctx)
|
|
440
759
|
|
|
441
760
|
|
|
442
|
-
@
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
@cli_util.option('--
|
|
446
|
-
@cli_util.option('--
|
|
447
|
-
@cli_util.option('--display-name', help=u"""A user
|
|
448
|
-
@cli_util.option('--
|
|
761
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.create_imported_model_hugging_face_model.command_name', 'create-imported-model-hugging-face-model'), help=u"""Import a model from ModelDataSource.
|
|
762
|
+
|
|
763
|
+
The header contains an opc-work-request-id, which is the id for the WorkRequest that tracks the importedModel creation progress. \n[Command Reference](createImportedModel)""")
|
|
764
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The compartment OCID from which the model is imported.""")
|
|
765
|
+
@cli_util.option('--data-source-model-id', required=True, help=u"""The full model OCID from Hugging Face, typically in the format \"org/model-name\" (e.g., \"meta-llama/Llama-2-7b\").""")
|
|
766
|
+
@cli_util.option('--display-name', help=u"""A user-friendly name for the imported model.""")
|
|
767
|
+
@cli_util.option('--description', help=u"""An optional description of the imported model.""")
|
|
768
|
+
@cli_util.option('--vendor', help=u"""The provider of the imported model.""")
|
|
769
|
+
@cli_util.option('--version-parameterconflict', help=u"""The version of the imported model.""")
|
|
770
|
+
@cli_util.option('--capabilities', type=custom_types.CliCaseInsensitiveChoice(["TEXT_TO_TEXT", "IMAGE_TEXT_TO_TEXT", "EMBEDDING", "RERANK"]), help=u"""Specifies the intended use or supported capabilities of the imported model.""")
|
|
449
771
|
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
450
772
|
|
|
451
773
|
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
452
774
|
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
453
775
|
|
|
454
776
|
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
777
|
+
@cli_util.option('--data-source-access-token', help=u"""Hugging Face access token to authenticate requests for restricted models. This token will be securely stored in OCI Vault.""")
|
|
778
|
+
@cli_util.option('--data-source-branch', help=u"""The name of the branch in the Hugging Face repository to import the model from. If not specified, \"main\" will be used by default. If you provide both a branch and a commit hash, the model will be imported from the specified commit.""")
|
|
779
|
+
@cli_util.option('--data-source-commit', help=u"""The commit hash in the Hugging Face repository to import the model from. If both a branch and a commit are provided, the commit hash will be used.""")
|
|
455
780
|
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
456
781
|
@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.""")
|
|
457
782
|
@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.""")
|
|
458
|
-
@json_skeleton_utils.get_cli_json_input_option({'
|
|
783
|
+
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
459
784
|
@cli_util.help_option
|
|
460
785
|
@click.pass_context
|
|
461
|
-
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'
|
|
786
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'ImportedModel'})
|
|
462
787
|
@cli_util.wrap_exceptions
|
|
463
|
-
def
|
|
788
|
+
def create_imported_model_hugging_face_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compartment_id, data_source_model_id, display_name, description, vendor, version_parameterconflict, capabilities, freeform_tags, defined_tags, data_source_access_token, data_source_branch, data_source_commit):
|
|
464
789
|
|
|
465
790
|
kwargs = {}
|
|
466
791
|
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
467
792
|
|
|
468
793
|
_details = {}
|
|
794
|
+
_details['dataSource'] = {}
|
|
469
795
|
_details['compartmentId'] = compartment_id
|
|
470
|
-
_details['
|
|
471
|
-
|
|
796
|
+
_details['dataSource']['modelId'] = data_source_model_id
|
|
797
|
+
|
|
798
|
+
if display_name is not None:
|
|
799
|
+
_details['displayName'] = display_name
|
|
472
800
|
|
|
473
801
|
if description is not None:
|
|
474
802
|
_details['description'] = description
|
|
475
803
|
|
|
476
|
-
if
|
|
477
|
-
_details['
|
|
804
|
+
if vendor is not None:
|
|
805
|
+
_details['vendor'] = vendor
|
|
478
806
|
|
|
479
|
-
if
|
|
480
|
-
_details['
|
|
807
|
+
if version_parameterconflict is not None:
|
|
808
|
+
_details['version'] = version_parameterconflict
|
|
809
|
+
|
|
810
|
+
if capabilities is not None:
|
|
811
|
+
_details['capabilities'] = cli_util.parse_json_parameter("capabilities", capabilities)
|
|
481
812
|
|
|
482
813
|
if freeform_tags is not None:
|
|
483
814
|
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
@@ -485,9 +816,20 @@ def create_generative_ai_private_endpoint(ctx, from_json, wait_for_state, max_wa
|
|
|
485
816
|
if defined_tags is not None:
|
|
486
817
|
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
487
818
|
|
|
819
|
+
if data_source_access_token is not None:
|
|
820
|
+
_details['dataSource']['accessToken'] = data_source_access_token
|
|
821
|
+
|
|
822
|
+
if data_source_branch is not None:
|
|
823
|
+
_details['dataSource']['branch'] = data_source_branch
|
|
824
|
+
|
|
825
|
+
if data_source_commit is not None:
|
|
826
|
+
_details['dataSource']['commit'] = data_source_commit
|
|
827
|
+
|
|
828
|
+
_details['dataSource']['sourceType'] = 'HUGGING_FACE_MODEL'
|
|
829
|
+
|
|
488
830
|
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
489
|
-
result = client.
|
|
490
|
-
|
|
831
|
+
result = client.create_imported_model(
|
|
832
|
+
create_imported_model_details=_details,
|
|
491
833
|
**kwargs
|
|
492
834
|
)
|
|
493
835
|
if wait_for_state:
|
|
@@ -777,6 +1119,62 @@ def delete_generative_ai_private_endpoint(ctx, from_json, wait_for_state, max_wa
|
|
|
777
1119
|
cli_util.render_response(result, ctx)
|
|
778
1120
|
|
|
779
1121
|
|
|
1122
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.delete_imported_model.command_name', 'delete'), help=u"""Deletes an imported model. An imported model shouldn't be deleted if there's one or more active endpoints associated with that imported model. \n[Command Reference](deleteImportedModel)""")
|
|
1123
|
+
@cli_util.option('--imported-model-id', required=True, help=u"""The importedModel OCID""")
|
|
1124
|
+
@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.""")
|
|
1125
|
+
@cli_util.confirm_delete_option
|
|
1126
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
1127
|
+
@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.""")
|
|
1128
|
+
@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.""")
|
|
1129
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1130
|
+
@cli_util.help_option
|
|
1131
|
+
@click.pass_context
|
|
1132
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={})
|
|
1133
|
+
@cli_util.wrap_exceptions
|
|
1134
|
+
def delete_imported_model(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, imported_model_id, if_match):
|
|
1135
|
+
|
|
1136
|
+
if isinstance(imported_model_id, six.string_types) and len(imported_model_id.strip()) == 0:
|
|
1137
|
+
raise click.UsageError('Parameter --imported-model-id cannot be whitespace or empty string')
|
|
1138
|
+
|
|
1139
|
+
kwargs = {}
|
|
1140
|
+
if if_match is not None:
|
|
1141
|
+
kwargs['if_match'] = if_match
|
|
1142
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1143
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
1144
|
+
result = client.delete_imported_model(
|
|
1145
|
+
imported_model_id=imported_model_id,
|
|
1146
|
+
**kwargs
|
|
1147
|
+
)
|
|
1148
|
+
if wait_for_state:
|
|
1149
|
+
|
|
1150
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
1151
|
+
try:
|
|
1152
|
+
wait_period_kwargs = {}
|
|
1153
|
+
if max_wait_seconds is not None:
|
|
1154
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
1155
|
+
if wait_interval_seconds is not None:
|
|
1156
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
1157
|
+
if 'opc-work-request-id' not in result.headers:
|
|
1158
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
1159
|
+
cli_util.render_response(result, ctx)
|
|
1160
|
+
return
|
|
1161
|
+
|
|
1162
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
1163
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
1164
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
1165
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
1166
|
+
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)
|
|
1167
|
+
cli_util.render_response(result, ctx)
|
|
1168
|
+
sys.exit(2)
|
|
1169
|
+
except Exception:
|
|
1170
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
1171
|
+
cli_util.render_response(result, ctx)
|
|
1172
|
+
raise
|
|
1173
|
+
else:
|
|
1174
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
1175
|
+
cli_util.render_response(result, ctx)
|
|
1176
|
+
|
|
1177
|
+
|
|
780
1178
|
@model_group.command(name=cli_util.override('generative_ai.delete_model.command_name', 'delete'), help=u"""Deletes a custom model. A model shouldn't be deleted if there's one or more active endpoints associated with that model. \n[Command Reference](deleteModel)""")
|
|
781
1179
|
@cli_util.option('--model-id', required=True, help=u"""The model OCID""")
|
|
782
1180
|
@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.""")
|
|
@@ -899,6 +1297,28 @@ def get_generative_ai_private_endpoint(ctx, from_json, generative_ai_private_end
|
|
|
899
1297
|
cli_util.render_response(result, ctx)
|
|
900
1298
|
|
|
901
1299
|
|
|
1300
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.get_imported_model.command_name', 'get'), help=u"""Gets information about an imported model. \n[Command Reference](getImportedModel)""")
|
|
1301
|
+
@cli_util.option('--imported-model-id', required=True, help=u"""The importedModel OCID""")
|
|
1302
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1303
|
+
@cli_util.help_option
|
|
1304
|
+
@click.pass_context
|
|
1305
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'generative_ai', 'class': 'ImportedModel'})
|
|
1306
|
+
@cli_util.wrap_exceptions
|
|
1307
|
+
def get_imported_model(ctx, from_json, imported_model_id):
|
|
1308
|
+
|
|
1309
|
+
if isinstance(imported_model_id, six.string_types) and len(imported_model_id.strip()) == 0:
|
|
1310
|
+
raise click.UsageError('Parameter --imported-model-id cannot be whitespace or empty string')
|
|
1311
|
+
|
|
1312
|
+
kwargs = {}
|
|
1313
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1314
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
1315
|
+
result = client.get_imported_model(
|
|
1316
|
+
imported_model_id=imported_model_id,
|
|
1317
|
+
**kwargs
|
|
1318
|
+
)
|
|
1319
|
+
cli_util.render_response(result, ctx)
|
|
1320
|
+
|
|
1321
|
+
|
|
902
1322
|
@model_group.command(name=cli_util.override('generative_ai.get_model.command_name', 'get'), help=u"""Gets information about a custom model. \n[Command Reference](getModel)""")
|
|
903
1323
|
@cli_util.option('--model-id', required=True, help=u"""The model OCID""")
|
|
904
1324
|
@json_skeleton_utils.get_cli_json_input_option({})
|
|
@@ -1135,10 +1555,79 @@ def list_generative_ai_private_endpoints(ctx, from_json, all_pages, page_size, c
|
|
|
1135
1555
|
cli_util.render_response(result, ctx)
|
|
1136
1556
|
|
|
1137
1557
|
|
|
1558
|
+
@imported_model_collection_group.command(name=cli_util.override('generative_ai.list_imported_models.command_name', 'list-imported-models'), help=u"""Lists imported models in a specific compartment. \n[Command Reference](listImportedModels)""")
|
|
1559
|
+
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
1560
|
+
@cli_util.option('--vendor', help=u"""A filter to return only resources that match the entire vendor given.""")
|
|
1561
|
+
@cli_util.option('--capability', type=custom_types.CliCaseInsensitiveChoice(["TEXT_TO_TEXT", "IMAGE_TEXT_TO_TEXT", "EMBEDDING", "RERANK"]), multiple=True, help=u"""A filter to return only resources their capability matches the given capability.""")
|
|
1562
|
+
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources their lifecycleState matches the given lifecycleState.""")
|
|
1563
|
+
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
|
|
1564
|
+
@cli_util.option('--id', help=u"""The ID of the importedModel.""")
|
|
1565
|
+
@cli_util.option('--limit', type=click.INT, help=u"""For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
1566
|
+
@cli_util.option('--page', help=u"""For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination].""")
|
|
1567
|
+
@cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either 'ASC' or 'DESC'.""")
|
|
1568
|
+
@cli_util.option('--sort-by', type=custom_types.CliCaseInsensitiveChoice(["displayName", "lifecycleState", "timeCreated"]), help=u"""The field to sort by. You can provide only one sort order. Default order for `timeCreated` is descending.""")
|
|
1569
|
+
@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.""")
|
|
1570
|
+
@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.""")
|
|
1571
|
+
@json_skeleton_utils.get_cli_json_input_option({})
|
|
1572
|
+
@cli_util.help_option
|
|
1573
|
+
@click.pass_context
|
|
1574
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'generative_ai', 'class': 'ImportedModelCollection'})
|
|
1575
|
+
@cli_util.wrap_exceptions
|
|
1576
|
+
def list_imported_models(ctx, from_json, all_pages, page_size, compartment_id, vendor, capability, lifecycle_state, display_name, id, limit, page, sort_order, sort_by):
|
|
1577
|
+
|
|
1578
|
+
if all_pages and limit:
|
|
1579
|
+
raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
|
|
1580
|
+
|
|
1581
|
+
kwargs = {}
|
|
1582
|
+
if vendor is not None:
|
|
1583
|
+
kwargs['vendor'] = vendor
|
|
1584
|
+
if capability is not None and len(capability) > 0:
|
|
1585
|
+
kwargs['capability'] = capability
|
|
1586
|
+
if lifecycle_state is not None:
|
|
1587
|
+
kwargs['lifecycle_state'] = lifecycle_state
|
|
1588
|
+
if display_name is not None:
|
|
1589
|
+
kwargs['display_name'] = display_name
|
|
1590
|
+
if id is not None:
|
|
1591
|
+
kwargs['id'] = id
|
|
1592
|
+
if limit is not None:
|
|
1593
|
+
kwargs['limit'] = limit
|
|
1594
|
+
if page is not None:
|
|
1595
|
+
kwargs['page'] = page
|
|
1596
|
+
if sort_order is not None:
|
|
1597
|
+
kwargs['sort_order'] = sort_order
|
|
1598
|
+
if sort_by is not None:
|
|
1599
|
+
kwargs['sort_by'] = sort_by
|
|
1600
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
1601
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
1602
|
+
if all_pages:
|
|
1603
|
+
if page_size:
|
|
1604
|
+
kwargs['limit'] = page_size
|
|
1605
|
+
|
|
1606
|
+
result = cli_util.list_call_get_all_results(
|
|
1607
|
+
client.list_imported_models,
|
|
1608
|
+
compartment_id=compartment_id,
|
|
1609
|
+
**kwargs
|
|
1610
|
+
)
|
|
1611
|
+
elif limit is not None:
|
|
1612
|
+
result = cli_util.list_call_get_up_to_limit(
|
|
1613
|
+
client.list_imported_models,
|
|
1614
|
+
limit,
|
|
1615
|
+
page_size,
|
|
1616
|
+
compartment_id=compartment_id,
|
|
1617
|
+
**kwargs
|
|
1618
|
+
)
|
|
1619
|
+
else:
|
|
1620
|
+
result = client.list_imported_models(
|
|
1621
|
+
compartment_id=compartment_id,
|
|
1622
|
+
**kwargs
|
|
1623
|
+
)
|
|
1624
|
+
cli_util.render_response(result, ctx)
|
|
1625
|
+
|
|
1626
|
+
|
|
1138
1627
|
@model_collection_group.command(name=cli_util.override('generative_ai.list_models.command_name', 'list-models'), help=u"""Lists the models in a specific compartment. Includes pretrained base models and fine-tuned custom models. \n[Command Reference](listModels)""")
|
|
1139
1628
|
@cli_util.option('--compartment-id', required=True, help=u"""The [OCID] of the compartment in which to list resources.""")
|
|
1140
1629
|
@cli_util.option('--vendor', help=u"""A filter to return only resources that match the entire vendor given.""")
|
|
1141
|
-
@cli_util.option('--capability', type=custom_types.CliCaseInsensitiveChoice(["
|
|
1630
|
+
@cli_util.option('--capability', type=custom_types.CliCaseInsensitiveChoice(["TEXT_TO_TEXT", "IMAGE_TEXT_TO_TEXT", "EMBEDDING", "RERANK"]), multiple=True, help=u"""A filter to return only resources their capability matches the given capability.""")
|
|
1142
1631
|
@cli_util.option('--lifecycle-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "CREATING", "DELETING", "DELETED", "FAILED"]), help=u"""A filter to return only resources their lifecycleState matches the given lifecycleState.""")
|
|
1143
1632
|
@cli_util.option('--display-name', help=u"""A filter to return only resources that match the given display name exactly.""")
|
|
1144
1633
|
@cli_util.option('--id', help=u"""The ID of the model.""")
|
|
@@ -1653,6 +2142,98 @@ def update_generative_ai_private_endpoint(ctx, from_json, force, wait_for_state,
|
|
|
1653
2142
|
cli_util.render_response(result, ctx)
|
|
1654
2143
|
|
|
1655
2144
|
|
|
2145
|
+
@imported_model_group.command(name=cli_util.override('generative_ai.update_imported_model.command_name', 'update'), help=u"""Updates the properties of an imported model such as name, description, freeform tags, and defined tags. \n[Command Reference](updateImportedModel)""")
|
|
2146
|
+
@cli_util.option('--imported-model-id', required=True, help=u"""The importedModel OCID""")
|
|
2147
|
+
@cli_util.option('--display-name', help=u"""A user-friendly name.""")
|
|
2148
|
+
@cli_util.option('--description', help=u"""An optional description of the imported model.""")
|
|
2149
|
+
@cli_util.option('--vendor', help=u"""The provider of the imported model.""")
|
|
2150
|
+
@cli_util.option('--version-parameterconflict', help=u"""The version of the imported model.""")
|
|
2151
|
+
@cli_util.option('--freeform-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags].
|
|
2152
|
+
|
|
2153
|
+
Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2154
|
+
@cli_util.option('--defined-tags', type=custom_types.CLI_COMPLEX_TYPE, help=u"""Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags].
|
|
2155
|
+
|
|
2156
|
+
Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
|
|
2157
|
+
@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.""")
|
|
2158
|
+
@cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
|
|
2159
|
+
@cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]), multiple=True, help="""This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.""")
|
|
2160
|
+
@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.""")
|
|
2161
|
+
@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.""")
|
|
2162
|
+
@json_skeleton_utils.get_cli_json_input_option({'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}})
|
|
2163
|
+
@cli_util.help_option
|
|
2164
|
+
@click.pass_context
|
|
2165
|
+
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'freeform-tags': {'module': 'generative_ai', 'class': 'dict(str, string)'}, 'defined-tags': {'module': 'generative_ai', 'class': 'dict(str, dict(str, object))'}}, output_type={'module': 'generative_ai', 'class': 'ImportedModel'})
|
|
2166
|
+
@cli_util.wrap_exceptions
|
|
2167
|
+
def update_imported_model(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, imported_model_id, display_name, description, vendor, version_parameterconflict, freeform_tags, defined_tags, if_match):
|
|
2168
|
+
|
|
2169
|
+
if isinstance(imported_model_id, six.string_types) and len(imported_model_id.strip()) == 0:
|
|
2170
|
+
raise click.UsageError('Parameter --imported-model-id cannot be whitespace or empty string')
|
|
2171
|
+
if not force:
|
|
2172
|
+
if freeform_tags or defined_tags:
|
|
2173
|
+
if not click.confirm("WARNING: Updates to freeform-tags and defined-tags will replace any existing values. Are you sure you want to continue?"):
|
|
2174
|
+
ctx.abort()
|
|
2175
|
+
|
|
2176
|
+
kwargs = {}
|
|
2177
|
+
if if_match is not None:
|
|
2178
|
+
kwargs['if_match'] = if_match
|
|
2179
|
+
kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
|
|
2180
|
+
|
|
2181
|
+
_details = {}
|
|
2182
|
+
|
|
2183
|
+
if display_name is not None:
|
|
2184
|
+
_details['displayName'] = display_name
|
|
2185
|
+
|
|
2186
|
+
if description is not None:
|
|
2187
|
+
_details['description'] = description
|
|
2188
|
+
|
|
2189
|
+
if vendor is not None:
|
|
2190
|
+
_details['vendor'] = vendor
|
|
2191
|
+
|
|
2192
|
+
if version_parameterconflict is not None:
|
|
2193
|
+
_details['version'] = version_parameterconflict
|
|
2194
|
+
|
|
2195
|
+
if freeform_tags is not None:
|
|
2196
|
+
_details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
|
|
2197
|
+
|
|
2198
|
+
if defined_tags is not None:
|
|
2199
|
+
_details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
|
|
2200
|
+
|
|
2201
|
+
client = cli_util.build_client('generative_ai', 'generative_ai', ctx)
|
|
2202
|
+
result = client.update_imported_model(
|
|
2203
|
+
imported_model_id=imported_model_id,
|
|
2204
|
+
update_imported_model_details=_details,
|
|
2205
|
+
**kwargs
|
|
2206
|
+
)
|
|
2207
|
+
if wait_for_state:
|
|
2208
|
+
|
|
2209
|
+
if hasattr(client, 'get_work_request') and callable(getattr(client, 'get_work_request')):
|
|
2210
|
+
try:
|
|
2211
|
+
wait_period_kwargs = {}
|
|
2212
|
+
if max_wait_seconds is not None:
|
|
2213
|
+
wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
|
|
2214
|
+
if wait_interval_seconds is not None:
|
|
2215
|
+
wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
|
|
2216
|
+
if 'opc-work-request-id' not in result.headers:
|
|
2217
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
|
|
2218
|
+
cli_util.render_response(result, ctx)
|
|
2219
|
+
return
|
|
2220
|
+
|
|
2221
|
+
click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
|
|
2222
|
+
result = oci.wait_until(client, client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
|
|
2223
|
+
except oci.exceptions.MaximumWaitTimeExceeded as e:
|
|
2224
|
+
# If we fail, we should show an error, but we should still provide the information to the customer
|
|
2225
|
+
click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2226
|
+
cli_util.render_response(result, ctx)
|
|
2227
|
+
sys.exit(2)
|
|
2228
|
+
except Exception:
|
|
2229
|
+
click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
|
|
2230
|
+
cli_util.render_response(result, ctx)
|
|
2231
|
+
raise
|
|
2232
|
+
else:
|
|
2233
|
+
click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
|
|
2234
|
+
cli_util.render_response(result, ctx)
|
|
2235
|
+
|
|
2236
|
+
|
|
1656
2237
|
@model_group.command(name=cli_util.override('generative_ai.update_model.command_name', 'update'), help=u"""Updates the properties of a custom model such as name, description, version, freeform tags, and defined tags. \n[Command Reference](updateModel)""")
|
|
1657
2238
|
@cli_util.option('--model-id', required=True, help=u"""The model OCID""")
|
|
1658
2239
|
@cli_util.option('--display-name', help=u"""A user-friendly name.""")
|