oci-cli 3.72.1__py3-none-any.whl → 3.73.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.
Files changed (134) hide show
  1. oci_cli/bin/dif.psm1 +3 -3
  2. oci_cli/bin/mysql.psm1 +6 -2
  3. oci_cli/bin/opensearch.psm1 +2 -2
  4. oci_cli/bin/queue.psm1 +23 -11
  5. oci_cli/help_text_producer/data_files/text/cmdref/certificates/ca-bundle/get.txt +1 -1
  6. oci_cli/help_text_producer/data_files/text/cmdref/certificates/certificate-authority-bundle/get.txt +5 -5
  7. oci_cli/help_text_producer/data_files/text/cmdref/certificates/certificate-authority-bundle-version/list.txt +1 -2
  8. oci_cli/help_text_producer/data_files/text/cmdref/certificates/certificate-bundle/get.txt +6 -5
  9. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-root-ca-by-generating-config-details.txt +12 -8
  10. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-root-ca-managed-externally.txt +206 -0
  11. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-subordinate-ca-issued-by-internal-ca.txt +12 -8
  12. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/create-subordinate-ca-managed-internally-issued-by-external-ca.txt +229 -0
  13. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/list.txt +1 -1
  14. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-root-ca-by-generating-config-details.txt +8 -2
  15. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-root-ca-managed-externally.txt +222 -0
  16. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-subordinate-ca-issued-by-internal-ca.txt +8 -2
  17. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority/update-subordinate-ca-managed-internally-issued-by-external-ca.txt +233 -0
  18. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt/certificate-authority.txt +8 -0
  19. oci_cli/help_text_producer/data_files/text/cmdref/certs-mgmt.txt +8 -0
  20. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/apply-host-configuration.txt +0 -26
  21. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/attach.txt +0 -26
  22. oci_cli/help_text_producer/data_files/text/cmdref/compute/compute-host/check-host-configuration.txt +0 -26
  23. 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
  24. 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
  25. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/create.txt +12 -0
  26. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host/list.txt +5 -0
  27. oci_cli/help_text_producer/data_files/text/cmdref/compute/dedicated-vm-host-instance/list.txt +5 -0
  28. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-configuration/launch-compute-instance.txt +4 -0
  29. oci_cli/help_text_producer/data_files/text/cmdref/compute-management/instance-pool/create.txt +5 -4
  30. oci_cli/help_text_producer/data_files/text/cmdref/db/autonomous-database/restart.txt +4 -0
  31. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error/{list-errors.txt → list.txt} +5 -5
  32. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-error.txt +1 -1
  33. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log/{list-logs.txt → list.txt} +5 -5
  34. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request/work-request-log.txt +1 -1
  35. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control/work-request.txt +2 -2
  36. oci_cli/help_text_producer/data_files/text/cmdref/delegate-access-control.txt +2 -2
  37. oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/add.txt +51 -2
  38. oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/create.txt +50 -2
  39. oci_cli/help_text_producer/data_files/text/cmdref/dif/stack/deploy-artifacts.txt +36 -4
  40. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/agent-endpoint/create.txt +11 -0
  41. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/agent-endpoint/update.txt +11 -0
  42. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/change-compartment.txt +136 -0
  43. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/create.txt +170 -0
  44. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/delete.txt +134 -0
  45. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/get.txt +96 -0
  46. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/list.txt +143 -0
  47. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity/update.txt +184 -0
  48. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/provisioned-capacity.txt +31 -0
  49. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/create-tool-rag-tool-config.txt +37 -0
  50. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/create-tool-sql-tool-config.txt +4 -0
  51. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/update-tool-rag-tool-config.txt +37 -0
  52. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent/tool/update-tool-sql-tool-config.txt +4 -0
  53. oci_cli/help_text_producer/data_files/text/cmdref/generative-ai-agent.txt +14 -0
  54. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log-entry/list-work-request-logs.txt → work-request-log/list.txt} +5 -5
  55. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request/{work-request-log-entry.txt → work-request-log.txt} +3 -3
  56. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane/work-request.txt +2 -2
  57. oci_cli/help_text_producer/data_files/text/cmdref/governance-rules-control-plane.txt +2 -2
  58. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster/list-node-shapes.txt +129 -0
  59. oci_cli/help_text_producer/data_files/text/cmdref/kafka/cluster.txt +2 -0
  60. oci_cli/help_text_producer/data_files/text/cmdref/kafka.txt +2 -0
  61. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup/export.txt +154 -0
  62. oci_cli/help_text_producer/data_files/text/cmdref/mysql/backup.txt +2 -0
  63. oci_cli/help_text_producer/data_files/text/cmdref/mysql/work-request/cancel.txt +104 -0
  64. oci_cli/help_text_producer/data_files/text/cmdref/mysql/work-request.txt +2 -0
  65. oci_cli/help_text_producer/data_files/text/cmdref/mysql.txt +4 -0
  66. oci_cli/help_text_producer/data_files/text/cmdref/network/vcn/create.txt +1 -1
  67. oci_cli/help_text_producer/data_files/text/cmdref/network/vcn/update.txt +1 -1
  68. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/create.txt +205 -0
  69. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/delete.txt +146 -0
  70. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/get.txt +108 -0
  71. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/list.txt +160 -0
  72. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance/update.txt +217 -0
  73. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance/management-appliance.txt +22 -0
  74. oci_cli/help_text_producer/data_files/text/cmdref/ocvs/management-appliance.txt +25 -0
  75. oci_cli/help_text_producer/data_files/text/cmdref/ocvs.txt +14 -0
  76. oci_cli/help_text_producer/data_files/text/cmdref/opensearch/cluster/create.txt +11 -0
  77. oci_cli/help_text_producer/data_files/text/cmdref/opensearch/cluster/update.txt +11 -0
  78. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error/{list-errors.txt → list.txt} +5 -5
  79. oci_cli/help_text_producer/data_files/text/cmdref/organizations/work-request-error.txt +1 -1
  80. oci_cli/help_text_producer/data_files/text/cmdref/organizations.txt +1 -1
  81. oci_cli/help_text_producer/data_files/text/cmdref/queue/channels/list-channels.txt +4 -0
  82. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/delete-message.txt +4 -0
  83. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/delete-messages.txt +4 -0
  84. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/get-messages.txt +4 -0
  85. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/get-stats.txt +4 -0
  86. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/update-message.txt +4 -0
  87. oci_cli/help_text_producer/data_files/text/cmdref/queue/messages/update-messages.txt +4 -0
  88. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/create.txt +169 -0
  89. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/delete.txt +135 -0
  90. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/get.txt +97 -0
  91. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group/update.txt +185 -0
  92. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group-collection/list-consumer-groups.txt +142 -0
  93. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group-collection.txt +15 -0
  94. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/consumer-group.txt +20 -0
  95. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/queue/create.txt +18 -2
  96. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/queue/purge.txt +19 -6
  97. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin/queue/update.txt +16 -0
  98. oci_cli/help_text_producer/data_files/text/cmdref/queue/queue-admin.txt +14 -0
  99. oci_cli/help_text_producer/data_files/text/cmdref/queue.txt +14 -0
  100. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/create.txt +6 -6
  101. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/get.txt +2 -2
  102. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/list.txt +1 -1
  103. oci_cli/help_text_producer/data_files/text/cmdref/support/incident/update.txt +4 -4
  104. oci_cli/help_text_producer/data_files/text/cmdref/support/incident-resource-type/list.txt +3 -3
  105. oci_cli/help_text_producer/data_files/text/cmdref/support/validation-response/validate-user.txt +1 -1
  106. oci_cli/version.py +1 -1
  107. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/METADATA +2 -2
  108. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/RECORD +134 -102
  109. services/certificates/src/oci_cli_certificates/generated/certificates_cli.py +6 -6
  110. services/certificates_management/src/oci_cli_certificates_management/certificatesmanagement_cli_extended.py +126 -0
  111. services/certificates_management/src/oci_cli_certificates_management/generated/certificatesmanagement_cli.py +447 -25
  112. services/core/src/oci_cli_compute/generated/compute_cli.py +126 -174
  113. services/core/src/oci_cli_compute_management/generated/computemanagement_cli.py +13 -4
  114. services/core/src/oci_cli_virtual_network/generated/virtualnetwork_cli.py +2 -2
  115. services/database/src/oci_cli_database/generated/database_cli.py +4 -1
  116. services/dif/src/oci_cli_stack/generated/stack_cli.py +65 -17
  117. services/dif/src/oci_cli_stack/stack_cli_extended.py +9 -9
  118. services/generative_ai_agent/src/oci_cli_generative_ai_agent/generated/generativeaiagent_cli.py +435 -16
  119. services/managed_kafka/src/oci_cli_kafka_cluster/generated/kafkacluster_cli.py +56 -0
  120. services/mysql/src/oci_cli_db_backups/generated/dbbackups_cli.py +70 -0
  121. services/mysql/src/oci_cli_work_requests/generated/workrequests_cli.py +26 -0
  122. services/ocvp/src/oci_cli_management_appliance/__init__.py +4 -0
  123. services/ocvp/src/oci_cli_management_appliance/generated/__init__.py +4 -0
  124. services/ocvp/src/oci_cli_management_appliance/generated/client_mappings.py +14 -0
  125. services/ocvp/src/oci_cli_management_appliance/generated/managementappliance_cli.py +341 -0
  126. services/opensearch/src/oci_cli_opensearch_cluster/generated/opensearchcluster_cli.py +16 -8
  127. services/queue/src/oci_cli_queue/generated/queue_cli.py +28 -7
  128. services/queue/src/oci_cli_queue_admin/generated/queueadmin_cli.py +343 -10
  129. services/queue/src/oci_cli_queue_admin/queueadmin_cli_extended.py +54 -7
  130. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/LICENSE.txt +0 -0
  131. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  132. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/WHEEL +0 -0
  133. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/entry_points.txt +0 -0
  134. {oci_cli-3.72.1.dist-info → oci_cli-3.73.1.dist-info}/top_level.txt +0 -0
@@ -432,15 +432,12 @@ def add_image_shape_compatibility_entry(ctx, from_json, force, image_id, shape_n
432
432
  @compute_host_group.command(name=cli_util.override('compute.apply_host_configuration.command_name', 'apply-host-configuration'), help=u"""Triggers the asynchronous process that applies the host's target configuration \n[Command Reference](applyHostConfiguration)""")
433
433
  @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
434
434
  @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.""")
435
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["AVAILABLE", "OCCUPIED", "PROVISIONING", "REPAIR", "UNAVAILABLE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
436
- @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
437
- @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
438
435
  @json_skeleton_utils.get_cli_json_input_option({})
439
436
  @cli_util.help_option
440
437
  @click.pass_context
441
438
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'})
442
439
  @cli_util.wrap_exceptions
443
- def apply_host_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, if_match):
440
+ def apply_host_configuration(ctx, from_json, compute_host_id, if_match):
444
441
 
445
442
  if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
446
443
  raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
@@ -454,29 +451,6 @@ def apply_host_configuration(ctx, from_json, wait_for_state, max_wait_seconds, w
454
451
  compute_host_id=compute_host_id,
455
452
  **kwargs
456
453
  )
457
- if wait_for_state:
458
-
459
- if hasattr(client, 'get_compute_host') and callable(getattr(client, 'get_compute_host')):
460
- try:
461
- wait_period_kwargs = {}
462
- if max_wait_seconds is not None:
463
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
464
- if wait_interval_seconds is not None:
465
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
466
-
467
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
468
- result = oci.wait_until(client, client.get_compute_host(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
469
- except oci.exceptions.MaximumWaitTimeExceeded as e:
470
- # If we fail, we should show an error, but we should still provide the information to the customer
471
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
472
- cli_util.render_response(result, ctx)
473
- sys.exit(2)
474
- except Exception:
475
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
476
- cli_util.render_response(result, ctx)
477
- raise
478
- else:
479
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
480
454
  cli_util.render_response(result, ctx)
481
455
 
482
456
 
@@ -542,15 +516,12 @@ def attach_boot_volume(ctx, from_json, wait_for_state, max_wait_seconds, wait_in
542
516
  @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
543
517
  @cli_util.option('--compute-host-group-id', required=True, help=u"""'The [OCID] of the compute host group.'""")
544
518
  @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.""")
545
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["AVAILABLE", "OCCUPIED", "PROVISIONING", "REPAIR", "UNAVAILABLE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
546
- @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
547
- @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
548
519
  @json_skeleton_utils.get_cli_json_input_option({})
549
520
  @cli_util.help_option
550
521
  @click.pass_context
551
522
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'})
552
523
  @cli_util.wrap_exceptions
553
- def attach_compute_host_group_host(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, compute_host_group_id, if_match):
524
+ def attach_compute_host_group_host(ctx, from_json, compute_host_id, compute_host_group_id, if_match):
554
525
 
555
526
  if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
556
527
  raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
@@ -569,29 +540,6 @@ def attach_compute_host_group_host(ctx, from_json, wait_for_state, max_wait_seco
569
540
  attach_compute_host_group_host_details=_details,
570
541
  **kwargs
571
542
  )
572
- if wait_for_state:
573
-
574
- if hasattr(client, 'get_compute_host') and callable(getattr(client, 'get_compute_host')):
575
- try:
576
- wait_period_kwargs = {}
577
- if max_wait_seconds is not None:
578
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
579
- if wait_interval_seconds is not None:
580
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
581
-
582
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
583
- result = oci.wait_until(client, client.get_compute_host(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
584
- except oci.exceptions.MaximumWaitTimeExceeded as e:
585
- # If we fail, we should show an error, but we should still provide the information to the customer
586
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
587
- cli_util.render_response(result, ctx)
588
- sys.exit(2)
589
- except Exception:
590
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
591
- cli_util.render_response(result, ctx)
592
- raise
593
- else:
594
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
595
543
  cli_util.render_response(result, ctx)
596
544
 
597
545
 
@@ -1653,15 +1601,12 @@ def change_instance_compartment(ctx, from_json, wait_for_state, max_wait_seconds
1653
1601
  @compute_host_group.command(name=cli_util.override('compute.check_host_configuration.command_name', 'check-host-configuration'), help=u"""Marks the host to be checked for conformance to its target configuration \n[Command Reference](checkHostConfiguration)""")
1654
1602
  @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
1655
1603
  @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.""")
1656
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["AVAILABLE", "OCCUPIED", "PROVISIONING", "REPAIR", "UNAVAILABLE"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
1657
- @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
1658
- @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
1659
1604
  @json_skeleton_utils.get_cli_json_input_option({})
1660
1605
  @cli_util.help_option
1661
1606
  @click.pass_context
1662
1607
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'})
1663
1608
  @cli_util.wrap_exceptions
1664
- def check_host_configuration(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, if_match):
1609
+ def check_host_configuration(ctx, from_json, compute_host_id, if_match):
1665
1610
 
1666
1611
  if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
1667
1612
  raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
@@ -1675,29 +1620,6 @@ def check_host_configuration(ctx, from_json, wait_for_state, max_wait_seconds, w
1675
1620
  compute_host_id=compute_host_id,
1676
1621
  **kwargs
1677
1622
  )
1678
- if wait_for_state:
1679
-
1680
- if hasattr(client, 'get_compute_host') and callable(getattr(client, 'get_compute_host')):
1681
- try:
1682
- wait_period_kwargs = {}
1683
- if max_wait_seconds is not None:
1684
- wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
1685
- if wait_interval_seconds is not None:
1686
- wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
1687
-
1688
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
1689
- result = oci.wait_until(client, client.get_compute_host(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
1690
- except oci.exceptions.MaximumWaitTimeExceeded as e:
1691
- # If we fail, we should show an error, but we should still provide the information to the customer
1692
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
1693
- cli_util.render_response(result, ctx)
1694
- sys.exit(2)
1695
- except Exception:
1696
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
1697
- cli_util.render_response(result, ctx)
1698
- raise
1699
- else:
1700
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
1701
1623
  cli_util.render_response(result, ctx)
1702
1624
 
1703
1625
 
@@ -2322,6 +2244,8 @@ Example: `FAULT-DOMAIN-1`""")
2322
2244
 
2323
2245
  Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2324
2246
  @cli_util.option('--placement-constraint-details', type=custom_types.CLI_COMPLEX_TYPE, help=u"""""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2247
+ @cli_util.option('--capacity-config', help=u"""The capacity configuration selected to be configured for the Dedicated Virtual Machine host. Run [ListDedicatedVmHostShapes] API first to see the capacity configuration options.""")
2248
+ @cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched.""")
2325
2249
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
2326
2250
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2327
2251
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
@@ -2330,7 +2254,7 @@ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMP
2330
2254
  @click.pass_context
2331
2255
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}, 'placement-constraint-details': {'module': 'core', 'class': 'PlacementConstraintDetails'}}, output_type={'module': 'core', 'class': 'DedicatedVmHost'})
2332
2256
  @cli_util.wrap_exceptions
2333
- def create_dedicated_vm_host(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, defined_tags, display_name, fault_domain, freeform_tags, placement_constraint_details):
2257
+ def create_dedicated_vm_host(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, defined_tags, display_name, fault_domain, freeform_tags, placement_constraint_details, capacity_config, is_memory_encryption_enabled):
2334
2258
 
2335
2259
  kwargs = {}
2336
2260
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -2355,6 +2279,12 @@ def create_dedicated_vm_host(ctx, from_json, wait_for_state, max_wait_seconds, w
2355
2279
  if placement_constraint_details is not None:
2356
2280
  _details['placementConstraintDetails'] = cli_util.parse_json_parameter("placement_constraint_details", placement_constraint_details)
2357
2281
 
2282
+ if capacity_config is not None:
2283
+ _details['capacityConfig'] = capacity_config
2284
+
2285
+ if is_memory_encryption_enabled is not None:
2286
+ _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled
2287
+
2358
2288
  client = cli_util.build_client('core', 'compute', ctx)
2359
2289
  result = client.create_dedicated_vm_host(
2360
2290
  create_dedicated_vm_host_details=_details,
@@ -2405,6 +2335,8 @@ Example: `FAULT-DOMAIN-1`""")
2405
2335
  @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].
2406
2336
 
2407
2337
  Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2338
+ @cli_util.option('--capacity-config', help=u"""The capacity configuration selected to be configured for the Dedicated Virtual Machine host. Run [ListDedicatedVmHostShapes] API first to see the capacity configuration options.""")
2339
+ @cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched.""")
2408
2340
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
2409
2341
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2410
2342
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
@@ -2413,7 +2345,7 @@ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMP
2413
2345
  @click.pass_context
2414
2346
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'DedicatedVmHost'})
2415
2347
  @cli_util.wrap_exceptions
2416
- def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, placement_constraint_details_compute_host_group_id, defined_tags, display_name, fault_domain, freeform_tags):
2348
+ def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, placement_constraint_details_compute_host_group_id, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled):
2417
2349
 
2418
2350
  kwargs = {}
2419
2351
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -2437,6 +2369,12 @@ def create_dedicated_vm_host_host_group_placement_constraint_details(ctx, from_j
2437
2369
  if freeform_tags is not None:
2438
2370
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2439
2371
 
2372
+ if capacity_config is not None:
2373
+ _details['capacityConfig'] = capacity_config
2374
+
2375
+ if is_memory_encryption_enabled is not None:
2376
+ _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled
2377
+
2440
2378
  _details['placementConstraintDetails']['type'] = 'HOST_GROUP'
2441
2379
 
2442
2380
  client = cli_util.build_client('core', 'compute', ctx)
@@ -2489,6 +2427,8 @@ Example: `FAULT-DOMAIN-1`""")
2489
2427
  @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].
2490
2428
 
2491
2429
  Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
2430
+ @cli_util.option('--capacity-config', help=u"""The capacity configuration selected to be configured for the Dedicated Virtual Machine host. Run [ListDedicatedVmHostShapes] API first to see the capacity configuration options.""")
2431
+ @cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""Specifies if the Dedicated Virtual Machine Host (DVMH) is restricted to running only Confidential VMs. If `true`, only Confidential VMs can be launched. If `false`, Confidential VMs cannot be launched.""")
2492
2432
  @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
2493
2433
  @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
2494
2434
  @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
@@ -2497,7 +2437,7 @@ Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMP
2497
2437
  @click.pass_context
2498
2438
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'DedicatedVmHost'})
2499
2439
  @cli_util.wrap_exceptions
2500
- def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, placement_constraint_details_compute_bare_metal_host_id, defined_tags, display_name, fault_domain, freeform_tags):
2440
+ def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_details(ctx, from_json, wait_for_state, max_wait_seconds, wait_interval_seconds, availability_domain, compartment_id, dedicated_vm_host_shape, placement_constraint_details_compute_bare_metal_host_id, defined_tags, display_name, fault_domain, freeform_tags, capacity_config, is_memory_encryption_enabled):
2501
2441
 
2502
2442
  kwargs = {}
2503
2443
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
@@ -2521,6 +2461,12 @@ def create_dedicated_vm_host_compute_bare_metal_host_placement_constraint_detail
2521
2461
  if freeform_tags is not None:
2522
2462
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
2523
2463
 
2464
+ if capacity_config is not None:
2465
+ _details['capacityConfig'] = capacity_config
2466
+
2467
+ if is_memory_encryption_enabled is not None:
2468
+ _details['isMemoryEncryptionEnabled'] = is_memory_encryption_enabled
2469
+
2524
2470
  _details['placementConstraintDetails']['type'] = 'COMPUTE_BARE_METAL_HOST'
2525
2471
 
2526
2472
  client = cli_util.build_client('core', 'compute', ctx)
@@ -4289,45 +4235,45 @@ def get_compute_gpu_memory_fabric(ctx, from_json, compute_gpu_memory_fabric_id):
4289
4235
  cli_util.render_response(result, ctx)
4290
4236
 
4291
4237
 
4292
- @compute_host_group.command(name=cli_util.override('compute.get_compute_host.command_name', 'get'), help=u"""Gets information about the specified compute host \n[Command Reference](getComputeHost)""")
4293
- @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
4238
+ @compute_host_group_group.command(name=cli_util.override('compute.get_compute_host_group.command_name', 'get'), help=u"""Gets information about the specified compute host group \n[Command Reference](getComputeHostGroup)""")
4239
+ @cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""")
4294
4240
  @json_skeleton_utils.get_cli_json_input_option({})
4295
4241
  @cli_util.help_option
4296
4242
  @click.pass_context
4297
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'})
4243
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHostGroup'})
4298
4244
  @cli_util.wrap_exceptions
4299
- def get_compute_host(ctx, from_json, compute_host_id):
4245
+ def get_compute_host_group(ctx, from_json, compute_host_group_id):
4300
4246
 
4301
- if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
4302
- raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
4247
+ if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0:
4248
+ raise click.UsageError('Parameter --compute-host-group-id cannot be whitespace or empty string')
4303
4249
 
4304
4250
  kwargs = {}
4305
4251
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
4306
4252
  client = cli_util.build_client('core', 'compute', ctx)
4307
- result = client.get_compute_host(
4308
- compute_host_id=compute_host_id,
4253
+ result = client.get_compute_host_group(
4254
+ compute_host_group_id=compute_host_group_id,
4309
4255
  **kwargs
4310
4256
  )
4311
4257
  cli_util.render_response(result, ctx)
4312
4258
 
4313
4259
 
4314
- @compute_host_group_group.command(name=cli_util.override('compute.get_compute_host_group.command_name', 'get'), help=u"""Gets information about the specified compute host group \n[Command Reference](getComputeHostGroup)""")
4315
- @cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""")
4260
+ @compute_host_group.command(name=cli_util.override('compute.get_compute_hosts.command_name', 'get'), help=u"""Gets information about the specified compute host \n[Command Reference](getComputeHosts)""")
4261
+ @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
4316
4262
  @json_skeleton_utils.get_cli_json_input_option({})
4317
4263
  @cli_util.help_option
4318
4264
  @click.pass_context
4319
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHostGroup'})
4265
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'ComputeHost'})
4320
4266
  @cli_util.wrap_exceptions
4321
- def get_compute_host_group(ctx, from_json, compute_host_group_id):
4267
+ def get_compute_hosts(ctx, from_json, compute_host_id):
4322
4268
 
4323
- if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0:
4324
- raise click.UsageError('Parameter --compute-host-group-id cannot be whitespace or empty string')
4269
+ if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
4270
+ raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
4325
4271
 
4326
4272
  kwargs = {}
4327
4273
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
4328
4274
  client = cli_util.build_client('core', 'compute', ctx)
4329
- result = client.get_compute_host_group(
4330
- compute_host_group_id=compute_host_group_id,
4275
+ result = client.get_compute_hosts(
4276
+ compute_host_id=compute_host_id,
4331
4277
  **kwargs
4332
4278
  )
4333
4279
  cli_util.render_response(result, ctx)
@@ -10415,6 +10361,7 @@ def list_dedicated_vm_host_instance_shapes(ctx, from_json, all_pages, page_size,
10415
10361
  @cli_util.option('--availability-domain', help=u"""The name of the availability domain.
10416
10362
 
10417
10363
  Example: `Uocm:PHX-AD-1`""")
10364
+ @cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""A filter to return only confidential Dedicated VM hosts (DVMH) or confidential VM instances on DVMH.""")
10418
10365
  @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].
10419
10366
 
10420
10367
  Example: `50`""")
@@ -10430,7 +10377,7 @@ Example: `50`""")
10430
10377
  @click.pass_context
10431
10378
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'list[DedicatedVmHostInstanceSummary]'})
10432
10379
  @cli_util.wrap_exceptions
10433
- def list_dedicated_vm_host_instances(ctx, from_json, all_pages, page_size, compartment_id, dedicated_vm_host_id, availability_domain, limit, page, sort_by, sort_order):
10380
+ def list_dedicated_vm_host_instances(ctx, from_json, all_pages, page_size, compartment_id, dedicated_vm_host_id, availability_domain, is_memory_encryption_enabled, limit, page, sort_by, sort_order):
10434
10381
 
10435
10382
  if all_pages and limit:
10436
10383
  raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -10443,6 +10390,8 @@ def list_dedicated_vm_host_instances(ctx, from_json, all_pages, page_size, compa
10443
10390
  kwargs = {}
10444
10391
  if availability_domain is not None:
10445
10392
  kwargs['availability_domain'] = availability_domain
10393
+ if is_memory_encryption_enabled is not None:
10394
+ kwargs['is_memory_encryption_enabled'] = is_memory_encryption_enabled
10446
10395
  if limit is not None:
10447
10396
  kwargs['limit'] = limit
10448
10397
  if page is not None:
@@ -10559,6 +10508,7 @@ Example: `50`""")
10559
10508
  @cli_util.option('--sort-order', type=custom_types.CliCaseInsensitiveChoice(["ASC", "DESC"]), help=u"""The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.""")
10560
10509
  @cli_util.option('--remaining-memory-in-gbs-greater-than-or-equal-to', type=click.FLOAT, help=u"""The remaining memory of the dedicated VM host, in GBs.""")
10561
10510
  @cli_util.option('--remaining-ocpus-greater-than-or-equal-to', type=click.FLOAT, help=u"""The available OCPUs of the dedicated VM host.""")
10511
+ @cli_util.option('--is-memory-encryption-enabled', type=click.BOOL, help=u"""A filter to return only confidential Dedicated VM hosts (DVMH) or confidential VM instances on DVMH.""")
10562
10512
  @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.""")
10563
10513
  @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.""")
10564
10514
  @json_skeleton_utils.get_cli_json_input_option({})
@@ -10566,7 +10516,7 @@ Example: `50`""")
10566
10516
  @click.pass_context
10567
10517
  @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'core', 'class': 'list[DedicatedVmHostSummary]'})
10568
10518
  @cli_util.wrap_exceptions
10569
- def list_dedicated_vm_hosts(ctx, from_json, all_pages, page_size, compartment_id, availability_domain, lifecycle_state, display_name, instance_shape_name, limit, page, sort_by, sort_order, remaining_memory_in_gbs_greater_than_or_equal_to, remaining_ocpus_greater_than_or_equal_to):
10519
+ def list_dedicated_vm_hosts(ctx, from_json, all_pages, page_size, compartment_id, availability_domain, lifecycle_state, display_name, instance_shape_name, limit, page, sort_by, sort_order, remaining_memory_in_gbs_greater_than_or_equal_to, remaining_ocpus_greater_than_or_equal_to, is_memory_encryption_enabled):
10570
10520
 
10571
10521
  if all_pages and limit:
10572
10522
  raise click.UsageError('If you provide the --all option you cannot provide the --limit option')
@@ -10594,6 +10544,8 @@ def list_dedicated_vm_hosts(ctx, from_json, all_pages, page_size, compartment_id
10594
10544
  kwargs['remaining_memory_in_gbs_greater_than_or_equal_to'] = remaining_memory_in_gbs_greater_than_or_equal_to
10595
10545
  if remaining_ocpus_greater_than_or_equal_to is not None:
10596
10546
  kwargs['remaining_ocpus_greater_than_or_equal_to'] = remaining_ocpus_greater_than_or_equal_to
10547
+ if is_memory_encryption_enabled is not None:
10548
+ kwargs['is_memory_encryption_enabled'] = is_memory_encryption_enabled
10597
10549
  kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
10598
10550
  client = cli_util.build_client('core', 'compute', ctx)
10599
10551
  if all_pages:
@@ -11902,32 +11854,36 @@ def update_compute_gpu_memory_fabric(ctx, from_json, force, wait_for_state, max_
11902
11854
  cli_util.render_response(result, ctx)
11903
11855
 
11904
11856
 
11905
- @compute_host_group.command(name=cli_util.override('compute.update_compute_host.command_name', 'update'), help=u"""Customer can update the some fields for ComputeHost record \n[Command Reference](updateComputeHost)""")
11906
- @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
11857
+ @compute_host_group_group.command(name=cli_util.override('compute.update_compute_host_group.command_name', 'update'), help=u"""Updates the specified compute host group details. \n[Command Reference](updateComputeHostGroup)""")
11858
+ @cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""")
11859
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
11860
+ @cli_util.option('--configurations', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of HostGroupConfiguration objects
11861
+
11862
+ This option is a JSON list with items of type HostGroupConfiguration. For documentation on HostGroupConfiguration please see our API reference: https://docs.cloud.oracle.com/api/#/en/iaas/20160918/datatypes/HostGroupConfiguration.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
11863
+ @cli_util.option('--is-targeted-placement-required', type=click.BOOL, help=u"""A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group.""")
11907
11864
  @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].
11908
11865
 
11909
11866
  Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
11910
- @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
11911
11867
  @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].
11912
11868
 
11913
11869
  Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
11914
11870
  @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.""")
11915
11871
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
11916
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"]), 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.""")
11917
- @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.""")
11918
- @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.""")
11919
- @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
11872
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
11873
+ @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
11874
+ @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
11875
+ @json_skeleton_utils.get_cli_json_input_option({'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
11920
11876
  @cli_util.help_option
11921
11877
  @click.pass_context
11922
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
11878
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeHostGroup'})
11923
11879
  @cli_util.wrap_exceptions
11924
- def update_compute_host(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, defined_tags, display_name, freeform_tags, if_match):
11880
+ def update_compute_host_group(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_group_id, display_name, configurations, is_targeted_placement_required, defined_tags, freeform_tags, if_match):
11925
11881
 
11926
- if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
11927
- raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
11882
+ if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0:
11883
+ raise click.UsageError('Parameter --compute-host-group-id cannot be whitespace or empty string')
11928
11884
  if not force:
11929
- if defined_tags or freeform_tags:
11930
- if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
11885
+ if configurations or defined_tags or freeform_tags:
11886
+ if not click.confirm("WARNING: Updates to configurations and defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
11931
11887
  ctx.abort()
11932
11888
 
11933
11889
  kwargs = {}
@@ -11937,89 +11893,79 @@ def update_compute_host(ctx, from_json, force, wait_for_state, max_wait_seconds,
11937
11893
 
11938
11894
  _details = {}
11939
11895
 
11940
- if defined_tags is not None:
11941
- _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
11942
-
11943
11896
  if display_name is not None:
11944
11897
  _details['displayName'] = display_name
11945
11898
 
11899
+ if configurations is not None:
11900
+ _details['configurations'] = cli_util.parse_json_parameter("configurations", configurations)
11901
+
11902
+ if is_targeted_placement_required is not None:
11903
+ _details['isTargetedPlacementRequired'] = is_targeted_placement_required
11904
+
11905
+ if defined_tags is not None:
11906
+ _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
11907
+
11946
11908
  if freeform_tags is not None:
11947
11909
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
11948
11910
 
11949
11911
  client = cli_util.build_client('core', 'compute', ctx)
11950
- result = client.update_compute_host(
11951
- compute_host_id=compute_host_id,
11952
- update_compute_host_details=_details,
11912
+ result = client.update_compute_host_group(
11913
+ compute_host_group_id=compute_host_group_id,
11914
+ update_compute_host_group_details=_details,
11953
11915
  **kwargs
11954
11916
  )
11955
- work_request_client = cli_util.build_client('work_requests', 'work_request', ctx)
11956
11917
  if wait_for_state:
11957
11918
 
11958
- if hasattr(work_request_client, 'get_work_request') and callable(getattr(work_request_client, 'get_work_request')):
11919
+ if hasattr(client, 'get_compute_host_group') and callable(getattr(client, 'get_compute_host_group')):
11959
11920
  try:
11960
11921
  wait_period_kwargs = {}
11961
11922
  if max_wait_seconds is not None:
11962
11923
  wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
11963
11924
  if wait_interval_seconds is not None:
11964
11925
  wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
11965
- if 'opc-work-request-id' not in result.headers:
11966
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
11967
- cli_util.render_response(result, ctx)
11968
- return
11969
-
11970
- click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
11971
- result = oci.wait_until(work_request_client, work_request_client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
11972
- if hasattr(result, "data") and hasattr(result.data, "resources") and len(result.data.resources) == 1:
11973
- entity_type = result.data.resources[0].entity_type
11974
- identifier = result.data.resources[0].identifier
11975
- get_operation = 'get_' + entity_type
11976
- if hasattr(client, get_operation) and callable(getattr(client, get_operation)):
11977
- result = getattr(client, get_operation)(identifier)
11978
11926
 
11927
+ click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
11928
+ result = oci.wait_until(client, client.get_compute_host_group(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
11979
11929
  except oci.exceptions.MaximumWaitTimeExceeded as e:
11980
11930
  # If we fail, we should show an error, but we should still provide the information to the customer
11981
- click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
11931
+ click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
11982
11932
  cli_util.render_response(result, ctx)
11983
11933
  sys.exit(2)
11984
11934
  except Exception:
11985
- click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
11935
+ click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
11986
11936
  cli_util.render_response(result, ctx)
11987
11937
  raise
11988
11938
  else:
11989
- click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
11939
+ click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
11990
11940
  cli_util.render_response(result, ctx)
11991
11941
 
11992
11942
 
11993
- @compute_host_group_group.command(name=cli_util.override('compute.update_compute_host_group.command_name', 'update'), help=u"""Updates the specified compute host group details. \n[Command Reference](updateComputeHostGroup)""")
11994
- @cli_util.option('--compute-host-group-id', required=True, help=u"""The [OCID] of the compute host group.""")
11995
- @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
11996
- @cli_util.option('--configurations', type=custom_types.CLI_COMPLEX_TYPE, help=u"""A list of HostGroupConfiguration objects
11997
-
11998
- This option is a JSON list with items of type HostGroupConfiguration. For documentation on HostGroupConfiguration please see our API reference: https://docs.cloud.oracle.com/api/#/en/iaas/20160918/datatypes/HostGroupConfiguration.""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
11999
- @cli_util.option('--is-targeted-placement-required', type=click.BOOL, help=u"""A flag that allows customers to restrict placement for hosts attached to the group. If true, the only way to place on hosts is to target the specific host group.""")
11943
+ @compute_host_group.command(name=cli_util.override('compute.update_compute_hosts.command_name', 'update'), help=u"""Customer can update the some fields for ComputeHost record \n[Command Reference](updateComputeHosts)""")
11944
+ @cli_util.option('--compute-host-id', required=True, help=u"""The [OCID] of the compute host.""")
12000
11945
  @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].
12001
11946
 
12002
11947
  Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
11948
+ @cli_util.option('--display-name', help=u"""A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.""")
12003
11949
  @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].
12004
11950
 
12005
11951
  Example: `{\"Department\": \"Finance\"}`""" + custom_types.cli_complex_type.COMPLEX_TYPE_HELP)
12006
11952
  @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.""")
12007
11953
  @cli_util.option('--force', help="""Perform update without prompting for confirmation.""", is_flag=True)
12008
- @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACTIVE", "DELETED"]), multiple=True, help="""This operation creates, modifies or deletes a resource that has a defined lifecycle state. Specify this option to perform the action and then wait until the resource reaches a given lifecycle 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.""")
12009
- @cli_util.option('--max-wait-seconds', type=click.INT, help="""The maximum time to wait for the resource to reach the lifecycle state defined by --wait-for-state. Defaults to 1200 seconds.""")
12010
- @cli_util.option('--wait-interval-seconds', type=click.INT, help="""Check every --wait-interval-seconds to see whether the resource has reached the lifecycle state defined by --wait-for-state. Defaults to 30 seconds.""")
12011
- @json_skeleton_utils.get_cli_json_input_option({'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
11954
+ @cli_util.option('--wait-for-state', type=custom_types.CliCaseInsensitiveChoice(["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"]), 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.""")
11955
+ @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.""")
11956
+ @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.""")
11957
+ @json_skeleton_utils.get_cli_json_input_option({'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
12012
11958
  @cli_util.help_option
12013
11959
  @click.pass_context
12014
- @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'configurations': {'module': 'core', 'class': 'list[HostGroupConfiguration]'}, 'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'ComputeHostGroup'})
11960
+ @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}})
12015
11961
  @cli_util.wrap_exceptions
12016
- def update_compute_host_group(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_group_id, display_name, configurations, is_targeted_placement_required, defined_tags, freeform_tags, if_match):
11962
+ def update_compute_hosts(ctx, from_json, force, wait_for_state, max_wait_seconds, wait_interval_seconds, compute_host_id, defined_tags, display_name, freeform_tags, if_match):
12017
11963
 
12018
- if isinstance(compute_host_group_id, six.string_types) and len(compute_host_group_id.strip()) == 0:
12019
- raise click.UsageError('Parameter --compute-host-group-id cannot be whitespace or empty string')
11964
+ if isinstance(compute_host_id, six.string_types) and len(compute_host_id.strip()) == 0:
11965
+ raise click.UsageError('Parameter --compute-host-id cannot be whitespace or empty string')
12020
11966
  if not force:
12021
- if configurations or defined_tags or freeform_tags:
12022
- if not click.confirm("WARNING: Updates to configurations and defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
11967
+ if defined_tags or freeform_tags:
11968
+ if not click.confirm("WARNING: Updates to defined-tags and freeform-tags will replace any existing values. Are you sure you want to continue?"):
12023
11969
  ctx.abort()
12024
11970
 
12025
11971
  kwargs = {}
@@ -12029,50 +11975,56 @@ def update_compute_host_group(ctx, from_json, force, wait_for_state, max_wait_se
12029
11975
 
12030
11976
  _details = {}
12031
11977
 
12032
- if display_name is not None:
12033
- _details['displayName'] = display_name
12034
-
12035
- if configurations is not None:
12036
- _details['configurations'] = cli_util.parse_json_parameter("configurations", configurations)
12037
-
12038
- if is_targeted_placement_required is not None:
12039
- _details['isTargetedPlacementRequired'] = is_targeted_placement_required
12040
-
12041
11978
  if defined_tags is not None:
12042
11979
  _details['definedTags'] = cli_util.parse_json_parameter("defined_tags", defined_tags)
12043
11980
 
11981
+ if display_name is not None:
11982
+ _details['displayName'] = display_name
11983
+
12044
11984
  if freeform_tags is not None:
12045
11985
  _details['freeformTags'] = cli_util.parse_json_parameter("freeform_tags", freeform_tags)
12046
11986
 
12047
11987
  client = cli_util.build_client('core', 'compute', ctx)
12048
- result = client.update_compute_host_group(
12049
- compute_host_group_id=compute_host_group_id,
12050
- update_compute_host_group_details=_details,
11988
+ result = client.update_compute_hosts(
11989
+ compute_host_id=compute_host_id,
11990
+ update_compute_hosts_details=_details,
12051
11991
  **kwargs
12052
11992
  )
11993
+ work_request_client = cli_util.build_client('work_requests', 'work_request', ctx)
12053
11994
  if wait_for_state:
12054
11995
 
12055
- if hasattr(client, 'get_compute_host_group') and callable(getattr(client, 'get_compute_host_group')):
11996
+ if hasattr(work_request_client, 'get_work_request') and callable(getattr(work_request_client, 'get_work_request')):
12056
11997
  try:
12057
11998
  wait_period_kwargs = {}
12058
11999
  if max_wait_seconds is not None:
12059
12000
  wait_period_kwargs['max_wait_seconds'] = max_wait_seconds
12060
12001
  if wait_interval_seconds is not None:
12061
12002
  wait_period_kwargs['max_interval_seconds'] = wait_interval_seconds
12003
+ if 'opc-work-request-id' not in result.headers:
12004
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state')
12005
+ cli_util.render_response(result, ctx)
12006
+ return
12007
+
12008
+ click.echo('Action completed. Waiting until the work request has entered state: {}'.format(wait_for_state), file=sys.stderr)
12009
+ result = oci.wait_until(work_request_client, work_request_client.get_work_request(result.headers['opc-work-request-id']), 'status', wait_for_state, **wait_period_kwargs)
12010
+ if hasattr(result, "data") and hasattr(result.data, "resources") and len(result.data.resources) == 1:
12011
+ entity_type = result.data.resources[0].entity_type
12012
+ identifier = result.data.resources[0].identifier
12013
+ get_operation = 'get_' + entity_type
12014
+ if hasattr(client, get_operation) and callable(getattr(client, get_operation)):
12015
+ result = getattr(client, get_operation)(identifier)
12062
12016
 
12063
- click.echo('Action completed. Waiting until the resource has entered state: {}'.format(wait_for_state), file=sys.stderr)
12064
- result = oci.wait_until(client, client.get_compute_host_group(result.data.id), 'lifecycle_state', wait_for_state, **wait_period_kwargs)
12065
12017
  except oci.exceptions.MaximumWaitTimeExceeded as e:
12066
12018
  # If we fail, we should show an error, but we should still provide the information to the customer
12067
- click.echo('Failed to wait until the resource entered the specified state. Outputting last known resource state', file=sys.stderr)
12019
+ click.echo('Failed to wait until the work request entered the specified state. Outputting last known resource state', file=sys.stderr)
12068
12020
  cli_util.render_response(result, ctx)
12069
12021
  sys.exit(2)
12070
12022
  except Exception:
12071
- click.echo('Encountered error while waiting for resource to enter the specified state. Outputting last known resource state', file=sys.stderr)
12023
+ click.echo('Encountered error while waiting for work request to enter the specified state. Outputting last known resource state', file=sys.stderr)
12072
12024
  cli_util.render_response(result, ctx)
12073
12025
  raise
12074
12026
  else:
12075
- click.echo('Unable to wait for the resource to enter the specified state', file=sys.stderr)
12027
+ click.echo('Unable to wait for the work request to enter the specified state', file=sys.stderr)
12076
12028
  cli_util.render_response(result, ctx)
12077
12029
 
12078
12030