oci 2.0.4 → 2.0.5
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.
- checksums.yaml +4 -4
- data/LICENSE.txt +3 -3
- data/README.md +72 -6
- data/lib/oci.rb +1 -1
- data/lib/oci/api_client.rb +1 -1
- data/lib/oci/audit/audit.rb +1 -1
- data/lib/oci/audit/audit_client.rb +1 -1
- data/lib/oci/audit/models/audit_event.rb +4 -4
- data/lib/oci/audit/models/configuration.rb +4 -4
- data/lib/oci/audit/models/update_configuration_details.rb +4 -4
- data/lib/oci/audit/util.rb +2 -1
- data/lib/oci/config.rb +1 -1
- data/lib/oci/config_file_loader.rb +1 -1
- data/lib/oci/core/blockstorage_client.rb +1 -1
- data/lib/oci/core/compute_client.rb +4 -2
- data/lib/oci/core/core.rb +2 -1
- data/lib/oci/core/models/attach_boot_volume_details.rb +4 -4
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +4 -4
- data/lib/oci/core/models/attach_vnic_details.rb +4 -4
- data/lib/oci/core/models/attach_volume_details.rb +4 -4
- data/lib/oci/core/models/boot_volume.rb +4 -4
- data/lib/oci/core/models/boot_volume_attachment.rb +4 -4
- data/lib/oci/core/models/bulk_add_virtual_circuit_public_prefixes_details.rb +4 -4
- data/lib/oci/core/models/bulk_delete_virtual_circuit_public_prefixes_details.rb +4 -4
- data/lib/oci/core/models/capture_console_history_details.rb +36 -5
- data/lib/oci/core/models/connect_local_peering_gateways_details.rb +4 -4
- data/lib/oci/core/models/console_history.rb +36 -6
- data/lib/oci/core/models/cpe.rb +4 -4
- data/lib/oci/core/models/create_cpe_details.rb +4 -4
- data/lib/oci/core/models/create_cross_connect_details.rb +4 -4
- data/lib/oci/core/models/create_cross_connect_group_details.rb +4 -4
- data/lib/oci/core/models/create_dhcp_details.rb +36 -5
- data/lib/oci/core/models/create_drg_attachment_details.rb +4 -4
- data/lib/oci/core/models/create_drg_details.rb +4 -4
- data/lib/oci/core/models/create_image_details.rb +69 -8
- data/lib/oci/core/models/create_instance_console_connection_details.rb +36 -5
- data/lib/oci/core/models/create_internet_gateway_details.rb +4 -4
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +4 -4
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +4 -4
- data/lib/oci/core/models/create_private_ip_details.rb +36 -5
- data/lib/oci/core/models/create_route_table_details.rb +36 -5
- data/lib/oci/core/models/create_security_list_details.rb +36 -5
- data/lib/oci/core/models/create_subnet_details.rb +36 -5
- data/lib/oci/core/models/create_vcn_details.rb +39 -8
- data/lib/oci/core/models/create_virtual_circuit_details.rb +4 -4
- data/lib/oci/core/models/create_virtual_circuit_public_prefix_details.rb +4 -4
- data/lib/oci/core/models/create_vnic_details.rb +4 -4
- data/lib/oci/core/models/create_volume_backup_details.rb +36 -5
- data/lib/oci/core/models/create_volume_details.rb +36 -5
- data/lib/oci/core/models/cross_connect.rb +4 -4
- data/lib/oci/core/models/cross_connect_group.rb +4 -4
- data/lib/oci/core/models/cross_connect_location.rb +4 -4
- data/lib/oci/core/models/cross_connect_mapping.rb +4 -4
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +4 -4
- data/lib/oci/core/models/cross_connect_status.rb +4 -4
- data/lib/oci/core/models/delete_virtual_circuit_public_prefix_details.rb +4 -4
- data/lib/oci/core/models/dhcp_dns_option.rb +4 -4
- data/lib/oci/core/models/dhcp_option.rb +4 -4
- data/lib/oci/core/models/dhcp_options.rb +36 -5
- data/lib/oci/core/models/dhcp_search_domain_option.rb +4 -4
- data/lib/oci/core/models/drg.rb +4 -4
- data/lib/oci/core/models/drg_attachment.rb +4 -4
- data/lib/oci/core/models/egress_security_rule.rb +4 -4
- data/lib/oci/core/models/export_image_details.rb +4 -4
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +4 -4
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +4 -4
- data/lib/oci/core/models/fast_connect_provider_service.rb +4 -4
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +4 -4
- data/lib/oci/core/models/icmp_options.rb +4 -4
- data/lib/oci/core/models/image.rb +77 -6
- data/lib/oci/core/models/image_source_details.rb +32 -5
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +8 -5
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +8 -5
- data/lib/oci/core/models/ingress_security_rule.rb +4 -4
- data/lib/oci/core/models/instance.rb +77 -5
- data/lib/oci/core/models/instance_console_connection.rb +52 -8
- data/lib/oci/core/models/instance_credentials.rb +4 -4
- data/lib/oci/core/models/instance_source_details.rb +4 -4
- data/lib/oci/core/models/instance_source_via_boot_volume_details.rb +4 -4
- data/lib/oci/core/models/instance_source_via_image_details.rb +4 -4
- data/lib/oci/core/models/internet_gateway.rb +4 -4
- data/lib/oci/core/models/ip_sec_connection.rb +4 -4
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +4 -4
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +4 -4
- data/lib/oci/core/models/launch_instance_details.rb +39 -6
- data/lib/oci/core/models/launch_options.rb +239 -0
- data/lib/oci/core/models/letter_of_authority.rb +4 -4
- data/lib/oci/core/models/local_peering_gateway.rb +4 -4
- data/lib/oci/core/models/port_range.rb +4 -4
- data/lib/oci/core/models/private_ip.rb +36 -5
- data/lib/oci/core/models/route_rule.rb +4 -4
- data/lib/oci/core/models/route_table.rb +36 -5
- data/lib/oci/core/models/security_list.rb +36 -5
- data/lib/oci/core/models/shape.rb +4 -4
- data/lib/oci/core/models/subnet.rb +36 -5
- data/lib/oci/core/models/tcp_options.rb +4 -4
- data/lib/oci/core/models/tunnel_config.rb +4 -4
- data/lib/oci/core/models/tunnel_status.rb +4 -4
- data/lib/oci/core/models/udp_options.rb +4 -4
- data/lib/oci/core/models/update_boot_volume_details.rb +4 -4
- data/lib/oci/core/models/update_console_history_details.rb +39 -8
- data/lib/oci/core/models/update_cpe_details.rb +4 -4
- data/lib/oci/core/models/update_cross_connect_details.rb +4 -4
- data/lib/oci/core/models/update_cross_connect_group_details.rb +4 -4
- data/lib/oci/core/models/update_dhcp_details.rb +36 -5
- data/lib/oci/core/models/update_drg_attachment_details.rb +4 -4
- data/lib/oci/core/models/update_drg_details.rb +4 -4
- data/lib/oci/core/models/update_image_details.rb +39 -8
- data/lib/oci/core/models/update_instance_details.rb +39 -8
- data/lib/oci/core/models/update_internet_gateway_details.rb +4 -4
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +4 -4
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +4 -4
- data/lib/oci/core/models/update_private_ip_details.rb +36 -5
- data/lib/oci/core/models/update_route_table_details.rb +36 -5
- data/lib/oci/core/models/update_security_list_details.rb +36 -5
- data/lib/oci/core/models/update_subnet_details.rb +39 -8
- data/lib/oci/core/models/update_vcn_details.rb +39 -8
- data/lib/oci/core/models/update_virtual_circuit_details.rb +4 -4
- data/lib/oci/core/models/update_vnic_details.rb +4 -4
- data/lib/oci/core/models/update_volume_backup_details.rb +39 -8
- data/lib/oci/core/models/update_volume_details.rb +39 -8
- data/lib/oci/core/models/vcn.rb +36 -5
- data/lib/oci/core/models/virtual_circuit.rb +4 -4
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +4 -4
- data/lib/oci/core/models/virtual_circuit_public_prefix.rb +4 -4
- data/lib/oci/core/models/vnic.rb +4 -4
- data/lib/oci/core/models/vnic_attachment.rb +4 -4
- data/lib/oci/core/models/volume.rb +36 -5
- data/lib/oci/core/models/volume_attachment.rb +4 -4
- data/lib/oci/core/models/volume_backup.rb +36 -5
- data/lib/oci/core/models/volume_source_details.rb +4 -4
- data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +4 -4
- data/lib/oci/core/models/volume_source_from_volume_details.rb +4 -4
- data/lib/oci/core/util.rb +2 -1
- data/lib/oci/core/virtual_network_client.rb +1 -1
- data/lib/oci/database/database.rb +1 -1
- data/lib/oci/database/database_client.rb +1 -1
- data/lib/oci/database/models/backup.rb +4 -4
- data/lib/oci/database/models/backup_summary.rb +4 -4
- data/lib/oci/database/models/create_backup_details.rb +4 -4
- data/lib/oci/database/models/create_data_guard_association_details.rb +4 -4
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +4 -4
- data/lib/oci/database/models/create_database_details.rb +4 -4
- data/lib/oci/database/models/create_database_from_backup_details.rb +4 -4
- data/lib/oci/database/models/create_db_home_details.rb +4 -4
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +4 -4
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +4 -4
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +4 -4
- data/lib/oci/database/models/data_guard_association.rb +4 -4
- data/lib/oci/database/models/data_guard_association_summary.rb +4 -4
- data/lib/oci/database/models/database.rb +4 -4
- data/lib/oci/database/models/database_summary.rb +4 -4
- data/lib/oci/database/models/db_backup_config.rb +4 -4
- data/lib/oci/database/models/db_home.rb +4 -4
- data/lib/oci/database/models/db_home_summary.rb +4 -4
- data/lib/oci/database/models/db_node.rb +4 -4
- data/lib/oci/database/models/db_node_summary.rb +4 -4
- data/lib/oci/database/models/db_system.rb +4 -4
- data/lib/oci/database/models/db_system_shape_summary.rb +4 -4
- data/lib/oci/database/models/db_system_summary.rb +4 -4
- data/lib/oci/database/models/db_version_summary.rb +4 -4
- data/lib/oci/database/models/failover_data_guard_association_details.rb +4 -4
- data/lib/oci/database/models/launch_db_system_details.rb +4 -4
- data/lib/oci/database/models/patch.rb +4 -4
- data/lib/oci/database/models/patch_details.rb +4 -4
- data/lib/oci/database/models/patch_history_entry.rb +4 -4
- data/lib/oci/database/models/patch_history_entry_summary.rb +4 -4
- data/lib/oci/database/models/patch_summary.rb +4 -4
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +4 -4
- data/lib/oci/database/models/restore_database_details.rb +4 -4
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +4 -4
- data/lib/oci/database/models/update_database_details.rb +4 -4
- data/lib/oci/database/models/update_db_home_details.rb +4 -4
- data/lib/oci/database/models/update_db_system_details.rb +4 -4
- data/lib/oci/database/util.rb +2 -1
- data/lib/oci/errors.rb +1 -1
- data/lib/oci/global_context.rb +1 -1
- data/lib/oci/identity/identity.rb +9 -1
- data/lib/oci/identity/identity_client.rb +339 -1
- data/lib/oci/identity/models/add_user_to_group_details.rb +4 -4
- data/lib/oci/identity/models/api_key.rb +4 -4
- data/lib/oci/identity/models/availability_domain.rb +4 -4
- data/lib/oci/identity/models/compartment.rb +34 -8
- data/lib/oci/identity/models/create_api_key_details.rb +4 -4
- data/lib/oci/identity/models/create_compartment_details.rb +34 -8
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +4 -4
- data/lib/oci/identity/models/create_group_details.rb +34 -8
- data/lib/oci/identity/models/create_identity_provider_details.rb +34 -8
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +4 -4
- data/lib/oci/identity/models/create_policy_details.rb +34 -8
- data/lib/oci/identity/models/create_region_subscription_details.rb +4 -4
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +11 -5
- data/lib/oci/identity/models/create_swift_password_details.rb +4 -4
- data/lib/oci/identity/models/create_tag_details.rb +158 -0
- data/lib/oci/identity/models/create_tag_namespace_details.rb +169 -0
- data/lib/oci/identity/models/create_user_details.rb +34 -8
- data/lib/oci/identity/models/customer_secret_key.rb +4 -4
- data/lib/oci/identity/models/customer_secret_key_summary.rb +4 -4
- data/lib/oci/identity/models/group.rb +35 -8
- data/lib/oci/identity/models/identity_provider.rb +34 -8
- data/lib/oci/identity/models/idp_group_mapping.rb +4 -4
- data/lib/oci/identity/models/policy.rb +34 -8
- data/lib/oci/identity/models/region.rb +4 -4
- data/lib/oci/identity/models/region_subscription.rb +4 -4
- data/lib/oci/identity/models/saml2_identity_provider.rb +11 -5
- data/lib/oci/identity/models/swift_password.rb +4 -4
- data/lib/oci/identity/models/tag.rb +228 -0
- data/lib/oci/identity/models/tag_namespace.rb +205 -0
- data/lib/oci/identity/models/tag_namespace_summary.rb +205 -0
- data/lib/oci/identity/models/tag_summary.rb +205 -0
- data/lib/oci/identity/models/tenancy.rb +34 -8
- data/lib/oci/identity/models/ui_password.rb +4 -4
- data/lib/oci/identity/models/update_compartment_details.rb +34 -8
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +4 -4
- data/lib/oci/identity/models/update_group_details.rb +34 -8
- data/lib/oci/identity/models/update_identity_provider_details.rb +34 -8
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +4 -4
- data/lib/oci/identity/models/update_policy_details.rb +34 -8
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +11 -5
- data/lib/oci/identity/models/update_state_details.rb +4 -4
- data/lib/oci/identity/models/update_swift_password_details.rb +4 -4
- data/lib/oci/identity/models/update_tag_details.rb +157 -0
- data/lib/oci/identity/models/update_tag_namespace_details.rb +157 -0
- data/lib/oci/identity/models/update_user_details.rb +34 -8
- data/lib/oci/identity/models/user.rb +35 -8
- data/lib/oci/identity/models/user_group_membership.rb +4 -4
- data/lib/oci/identity/util.rb +2 -1
- data/lib/oci/internal/internal.rb +1 -1
- data/lib/oci/internal/util.rb +2 -2
- data/lib/oci/load_balancer/load_balancer.rb +1 -1
- data/lib/oci/load_balancer/load_balancer_client.rb +1 -1
- data/lib/oci/load_balancer/models/backend.rb +4 -4
- data/lib/oci/load_balancer/models/backend_details.rb +4 -4
- data/lib/oci/load_balancer/models/backend_health.rb +4 -4
- data/lib/oci/load_balancer/models/backend_set.rb +4 -4
- data/lib/oci/load_balancer/models/backend_set_details.rb +4 -4
- data/lib/oci/load_balancer/models/backend_set_health.rb +4 -4
- data/lib/oci/load_balancer/models/certificate.rb +4 -4
- data/lib/oci/load_balancer/models/certificate_details.rb +4 -4
- data/lib/oci/load_balancer/models/create_backend_details.rb +4 -4
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +4 -4
- data/lib/oci/load_balancer/models/create_certificate_details.rb +4 -4
- data/lib/oci/load_balancer/models/create_listener_details.rb +4 -4
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +4 -4
- data/lib/oci/load_balancer/models/health_check_result.rb +4 -4
- data/lib/oci/load_balancer/models/health_checker.rb +4 -4
- data/lib/oci/load_balancer/models/health_checker_details.rb +4 -4
- data/lib/oci/load_balancer/models/ip_address.rb +4 -4
- data/lib/oci/load_balancer/models/listener.rb +4 -4
- data/lib/oci/load_balancer/models/listener_details.rb +4 -4
- data/lib/oci/load_balancer/models/load_balancer.rb +4 -4
- data/lib/oci/load_balancer/models/load_balancer_health.rb +4 -4
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +4 -4
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +4 -4
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +4 -4
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +4 -4
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +4 -4
- data/lib/oci/load_balancer/models/ssl_configuration.rb +4 -4
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +4 -4
- data/lib/oci/load_balancer/models/update_backend_details.rb +4 -4
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +4 -4
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +4 -4
- data/lib/oci/load_balancer/models/update_listener_details.rb +4 -4
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +4 -4
- data/lib/oci/load_balancer/models/work_request.rb +4 -4
- data/lib/oci/load_balancer/models/work_request_error.rb +4 -4
- data/lib/oci/load_balancer/util.rb +1 -1
- data/lib/oci/object_storage/models/bucket.rb +4 -4
- data/lib/oci/object_storage/models/bucket_summary.rb +4 -4
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +4 -4
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +4 -4
- data/lib/oci/object_storage/models/create_bucket_details.rb +4 -4
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +4 -4
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +4 -4
- data/lib/oci/object_storage/models/list_objects.rb +4 -4
- data/lib/oci/object_storage/models/multipart_upload.rb +4 -4
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +4 -4
- data/lib/oci/object_storage/models/namespace_metadata.rb +4 -4
- data/lib/oci/object_storage/models/object_summary.rb +4 -4
- data/lib/oci/object_storage/models/preauthenticated_request.rb +4 -4
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +4 -4
- data/lib/oci/object_storage/models/rename_object_details.rb +4 -4
- data/lib/oci/object_storage/models/restore_objects_details.rb +4 -4
- data/lib/oci/object_storage/models/update_bucket_details.rb +4 -4
- data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +4 -4
- data/lib/oci/object_storage/object_storage.rb +1 -1
- data/lib/oci/object_storage/object_storage_client.rb +1 -1
- data/lib/oci/object_storage/util.rb +2 -1
- data/lib/oci/regions.rb +1 -1
- data/lib/oci/response.rb +1 -1
- data/lib/oci/response_headers.rb +1 -1
- data/lib/oci/signer.rb +1 -1
- data/lib/oci/version.rb +2 -2
- data/lib/oci/waiter.rb +21 -5
- data/lib/oraclebmc.rb +1 -1
- metadata +11 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -80,10 +80,10 @@ module OCI
|
|
|
80
80
|
# check to ensure the input is an array given that the the attribute
|
|
81
81
|
# is documented as an array but the input is not
|
|
82
82
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
83
|
-
self.
|
|
83
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
84
84
|
end
|
|
85
85
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
86
|
-
self.
|
|
86
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
87
87
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -101,7 +101,7 @@ module OCI
|
|
|
101
101
|
def to_hash
|
|
102
102
|
hash = {}
|
|
103
103
|
self.class.attribute_map.each_pair do |attr, param|
|
|
104
|
-
value =
|
|
104
|
+
value = public_method(attr).call
|
|
105
105
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
106
106
|
hash[param] = _to_hash(value)
|
|
107
107
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -71,10 +71,10 @@ module OCI
|
|
|
71
71
|
# check to ensure the input is an array given that the the attribute
|
|
72
72
|
# is documented as an array but the input is not
|
|
73
73
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
74
|
-
self.
|
|
74
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
75
75
|
end
|
|
76
76
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
77
|
-
self.
|
|
77
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
78
78
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -92,7 +92,7 @@ module OCI
|
|
|
92
92
|
def to_hash
|
|
93
93
|
hash = {}
|
|
94
94
|
self.class.attribute_map.each_pair do |attr, param|
|
|
95
|
-
value =
|
|
95
|
+
value = public_method(attr).call
|
|
96
96
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
97
97
|
hash[param] = _to_hash(value)
|
|
98
98
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -82,10 +82,10 @@ module OCI
|
|
|
82
82
|
# check to ensure the input is an array given that the the attribute
|
|
83
83
|
# is documented as an array but the input is not
|
|
84
84
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
85
|
-
self.
|
|
85
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
86
86
|
end
|
|
87
87
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
88
|
-
self.
|
|
88
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
89
89
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
90
90
|
end
|
|
91
91
|
|
|
@@ -103,7 +103,7 @@ module OCI
|
|
|
103
103
|
def to_hash
|
|
104
104
|
hash = {}
|
|
105
105
|
self.class.attribute_map.each_pair do |attr, param|
|
|
106
|
-
value =
|
|
106
|
+
value = public_method(attr).call
|
|
107
107
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
108
108
|
hash[param] = _to_hash(value)
|
|
109
109
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -130,10 +130,10 @@ module OCI
|
|
|
130
130
|
# check to ensure the input is an array given that the the attribute
|
|
131
131
|
# is documented as an array but the input is not
|
|
132
132
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
133
|
-
self.
|
|
133
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
134
134
|
end
|
|
135
135
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
136
|
-
self.
|
|
136
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
137
137
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
138
138
|
end
|
|
139
139
|
|
|
@@ -151,7 +151,7 @@ module OCI
|
|
|
151
151
|
def to_hash
|
|
152
152
|
hash = {}
|
|
153
153
|
self.class.attribute_map.each_pair do |attr, param|
|
|
154
|
-
value =
|
|
154
|
+
value = public_method(attr).call
|
|
155
155
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
156
156
|
hash[param] = _to_hash(value)
|
|
157
157
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -117,10 +117,10 @@ module OCI
|
|
|
117
117
|
# check to ensure the input is an array given that the the attribute
|
|
118
118
|
# is documented as an array but the input is not
|
|
119
119
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
120
|
-
self.
|
|
120
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
121
121
|
end
|
|
122
122
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
123
|
-
self.
|
|
123
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
124
124
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
125
125
|
end
|
|
126
126
|
|
|
@@ -138,7 +138,7 @@ module OCI
|
|
|
138
138
|
def to_hash
|
|
139
139
|
hash = {}
|
|
140
140
|
self.class.attribute_map.each_pair do |attr, param|
|
|
141
|
-
value =
|
|
141
|
+
value = public_method(attr).call
|
|
142
142
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
143
143
|
hash[param] = _to_hash(value)
|
|
144
144
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -89,10 +89,10 @@ module OCI
|
|
|
89
89
|
# check to ensure the input is an array given that the the attribute
|
|
90
90
|
# is documented as an array but the input is not
|
|
91
91
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
92
|
-
self.
|
|
92
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
93
93
|
end
|
|
94
94
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
95
|
-
self.
|
|
95
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
96
96
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
97
97
|
end
|
|
98
98
|
|
|
@@ -110,7 +110,7 @@ module OCI
|
|
|
110
110
|
def to_hash
|
|
111
111
|
hash = {}
|
|
112
112
|
self.class.attribute_map.each_pair do |attr, param|
|
|
113
|
-
value =
|
|
113
|
+
value = public_method(attr).call
|
|
114
114
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
115
115
|
hash[param] = _to_hash(value)
|
|
116
116
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -53,10 +53,10 @@ module OCI
|
|
|
53
53
|
# check to ensure the input is an array given that the the attribute
|
|
54
54
|
# is documented as an array but the input is not
|
|
55
55
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
56
|
-
self.
|
|
56
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
57
57
|
end
|
|
58
58
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
59
|
-
self.
|
|
59
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
60
60
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
61
61
|
end
|
|
62
62
|
|
|
@@ -74,7 +74,7 @@ module OCI
|
|
|
74
74
|
def to_hash
|
|
75
75
|
hash = {}
|
|
76
76
|
self.class.attribute_map.each_pair do |attr, param|
|
|
77
|
-
value =
|
|
77
|
+
value = public_method(attr).call
|
|
78
78
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
79
79
|
hash[param] = _to_hash(value)
|
|
80
80
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -108,10 +108,10 @@ module OCI
|
|
|
108
108
|
# check to ensure the input is an array given that the the attribute
|
|
109
109
|
# is documented as an array but the input is not
|
|
110
110
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
111
|
-
self.
|
|
111
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
112
112
|
end
|
|
113
113
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
114
|
-
self.
|
|
114
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
115
115
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
116
116
|
end
|
|
117
117
|
|
|
@@ -129,7 +129,7 @@ module OCI
|
|
|
129
129
|
def to_hash
|
|
130
130
|
hash = {}
|
|
131
131
|
self.class.attribute_map.each_pair do |attr, param|
|
|
132
|
-
value =
|
|
132
|
+
value = public_method(attr).call
|
|
133
133
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
134
134
|
hash[param] = _to_hash(value)
|
|
135
135
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
require 'date'
|
|
4
4
|
|
|
@@ -62,10 +62,10 @@ module OCI
|
|
|
62
62
|
# check to ensure the input is an array given that the the attribute
|
|
63
63
|
# is documented as an array but the input is not
|
|
64
64
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
65
|
-
self.
|
|
65
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
66
66
|
end
|
|
67
67
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
68
|
-
self.
|
|
68
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
69
69
|
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -83,7 +83,7 @@ module OCI
|
|
|
83
83
|
def to_hash
|
|
84
84
|
hash = {}
|
|
85
85
|
self.class.attribute_map.each_pair do |attr, param|
|
|
86
|
-
value =
|
|
86
|
+
value = public_method(attr).call
|
|
87
87
|
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
88
88
|
hash[param] = _to_hash(value)
|
|
89
89
|
end
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
data/lib/oci/regions.rb
CHANGED
data/lib/oci/response.rb
CHANGED
data/lib/oci/response_headers.rb
CHANGED
data/lib/oci/signer.rb
CHANGED
data/lib/oci/version.rb
CHANGED
data/lib/oci/waiter.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2016,
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
|
2
2
|
|
|
3
3
|
module OCI
|
|
4
4
|
module Waiter
|
|
@@ -44,15 +44,25 @@ module OCI
|
|
|
44
44
|
#
|
|
45
45
|
# @param [Symbol] property The property of the response data to evaluate. For example, :lifecycle_state.
|
|
46
46
|
# @param state The value of the property that will indicate successful completion of the wait.
|
|
47
|
+
# @param [Proc] eval_proc A proc/lambda which can be fed a response from a GET operation and evaluate whether a waiter should return
|
|
48
|
+
# or keep checking. This can be used for logic which extends beyond checking equality of a single attribute, for example checking
|
|
49
|
+
# that an attribute is one of a possible set of values. If an eval_proc is specified, then neither a property nor state can
|
|
50
|
+
# be specified. The result of the proc/lambda should be truthy if the waiter should stop waiting, and falsey otherwise.
|
|
47
51
|
# @param [Integer] max_interval_seconds The maximum interval between queries, in seconds.
|
|
48
52
|
# @param [Integer] max_wait_seconds The maximum time to wait, in seconds.
|
|
53
|
+
# @param [boolean] succeed_on_not_found A boolean determining whether or not the waiter should return successfully if the data we're waiting on is not found (e.g. a 404 is
|
|
54
|
+
# returned from the service). This defaults to false and so a 404 would cause an exception to be thrown by this function. Setting it to true may be useful
|
|
55
|
+
# in scenarios when waiting for a resource to be terminated/deleted since it is possible that the resource would not be returned by the a GET call anymore.
|
|
49
56
|
# @yieldparam [Response] response A response object for every additional successful call to the get request.
|
|
50
57
|
# Throw :stop_succeed from the yield to stop the waiter and return the current response.
|
|
51
58
|
# Throw :stop_fail from the yield to stop the waiter and throw a WaiterFailedError.
|
|
52
59
|
# @return [Response] The final response, which will contain the property in the specified state.
|
|
53
|
-
def wait_until(property, state, max_interval_seconds: 30, max_wait_seconds: 1200)
|
|
60
|
+
def wait_until(property = nil, state = nil, eval_proc: nil, max_interval_seconds: 30, max_wait_seconds: 1200, succeed_on_not_found: false)
|
|
54
61
|
raise 'Cannot wait on a response without data.' unless data
|
|
55
|
-
raise '
|
|
62
|
+
raise 'Either an eval_proc or a property and response must be specified' if !eval_proc && property.nil? && state.nil?
|
|
63
|
+
raise 'Cannot specify both an eval_proc and a property or state' if eval_proc && (!property.nil? || !state.nil?)
|
|
64
|
+
raise 'If a property is specified, then a state must also be specified' if !eval_proc && (property.nil? || state.nil?)
|
|
65
|
+
raise 'Response data does not contain the given property.' if property && !data.methods.include?(property)
|
|
56
66
|
|
|
57
67
|
raise Waiter::Errors::WaitUntilNotSupportedError, 'wait_until is not supported by this response.' unless @api_call
|
|
58
68
|
|
|
@@ -61,7 +71,8 @@ module OCI
|
|
|
61
71
|
start_time = Time.now
|
|
62
72
|
|
|
63
73
|
loop do
|
|
64
|
-
return response if response.data.send(property) == state
|
|
74
|
+
return response if !property.nil? && response.data.send(property) == state
|
|
75
|
+
return response if eval_proc && eval_proc.call(response)
|
|
65
76
|
|
|
66
77
|
elapsed_seconds = (Time.now - start_time).to_i
|
|
67
78
|
|
|
@@ -80,7 +91,12 @@ module OCI
|
|
|
80
91
|
interval_seconds = max_interval_seconds
|
|
81
92
|
end
|
|
82
93
|
|
|
83
|
-
|
|
94
|
+
begin
|
|
95
|
+
response = @api_call.call(nil)
|
|
96
|
+
rescue OCI::Errors::ServiceError => e
|
|
97
|
+
return nil if e.status_code == 404 and succeed_on_not_found
|
|
98
|
+
raise
|
|
99
|
+
end
|
|
84
100
|
|
|
85
101
|
next unless block_given?
|
|
86
102
|
|
data/lib/oraclebmc.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oci
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oracle
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -213,6 +213,7 @@ files:
|
|
|
213
213
|
- "./lib/oci/core/models/ip_sec_connection_device_config.rb"
|
|
214
214
|
- "./lib/oci/core/models/ip_sec_connection_device_status.rb"
|
|
215
215
|
- "./lib/oci/core/models/launch_instance_details.rb"
|
|
216
|
+
- "./lib/oci/core/models/launch_options.rb"
|
|
216
217
|
- "./lib/oci/core/models/letter_of_authority.rb"
|
|
217
218
|
- "./lib/oci/core/models/local_peering_gateway.rb"
|
|
218
219
|
- "./lib/oci/core/models/port_range.rb"
|
|
@@ -320,6 +321,8 @@ files:
|
|
|
320
321
|
- "./lib/oci/identity/models/create_region_subscription_details.rb"
|
|
321
322
|
- "./lib/oci/identity/models/create_saml2_identity_provider_details.rb"
|
|
322
323
|
- "./lib/oci/identity/models/create_swift_password_details.rb"
|
|
324
|
+
- "./lib/oci/identity/models/create_tag_details.rb"
|
|
325
|
+
- "./lib/oci/identity/models/create_tag_namespace_details.rb"
|
|
323
326
|
- "./lib/oci/identity/models/create_user_details.rb"
|
|
324
327
|
- "./lib/oci/identity/models/customer_secret_key.rb"
|
|
325
328
|
- "./lib/oci/identity/models/customer_secret_key_summary.rb"
|
|
@@ -331,6 +334,10 @@ files:
|
|
|
331
334
|
- "./lib/oci/identity/models/region_subscription.rb"
|
|
332
335
|
- "./lib/oci/identity/models/saml2_identity_provider.rb"
|
|
333
336
|
- "./lib/oci/identity/models/swift_password.rb"
|
|
337
|
+
- "./lib/oci/identity/models/tag.rb"
|
|
338
|
+
- "./lib/oci/identity/models/tag_namespace.rb"
|
|
339
|
+
- "./lib/oci/identity/models/tag_namespace_summary.rb"
|
|
340
|
+
- "./lib/oci/identity/models/tag_summary.rb"
|
|
334
341
|
- "./lib/oci/identity/models/tenancy.rb"
|
|
335
342
|
- "./lib/oci/identity/models/ui_password.rb"
|
|
336
343
|
- "./lib/oci/identity/models/update_compartment_details.rb"
|
|
@@ -342,6 +349,8 @@ files:
|
|
|
342
349
|
- "./lib/oci/identity/models/update_saml2_identity_provider_details.rb"
|
|
343
350
|
- "./lib/oci/identity/models/update_state_details.rb"
|
|
344
351
|
- "./lib/oci/identity/models/update_swift_password_details.rb"
|
|
352
|
+
- "./lib/oci/identity/models/update_tag_details.rb"
|
|
353
|
+
- "./lib/oci/identity/models/update_tag_namespace_details.rb"
|
|
345
354
|
- "./lib/oci/identity/models/update_user_details.rb"
|
|
346
355
|
- "./lib/oci/identity/models/user.rb"
|
|
347
356
|
- "./lib/oci/identity/models/user_group_membership.rb"
|