oci 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +262 -0
- data/lib/oci.rb +25 -0
- data/lib/oci/api_client.rb +389 -0
- data/lib/oci/config.rb +118 -0
- data/lib/oci/config_file_loader.rb +96 -0
- data/lib/oci/core/blockstorage_client.rb +462 -0
- data/lib/oci/core/compute_client.rb +1415 -0
- data/lib/oci/core/core.rb +114 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +137 -0
- data/lib/oci/core/models/attach_vnic_details.rb +144 -0
- data/lib/oci/core/models/attach_volume_details.rb +165 -0
- data/lib/oci/core/models/capture_console_history_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +213 -0
- data/lib/oci/core/models/cpe.rb +169 -0
- data/lib/oci/core/models/create_cpe_details.rb +145 -0
- data/lib/oci/core/models/create_cross_connect_details.rb +204 -0
- data/lib/oci/core/models/create_cross_connect_group_details.rb +133 -0
- data/lib/oci/core/models/create_dhcp_details.rb +153 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +142 -0
- data/lib/oci/core/models/create_drg_details.rb +131 -0
- data/lib/oci/core/models/create_image_details.rb +159 -0
- data/lib/oci/core/models/create_instance_console_connection_details.rb +131 -0
- data/lib/oci/core/models/create_internet_gateway_details.rb +153 -0
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +168 -0
- data/lib/oci/core/models/create_private_ip_details.rb +173 -0
- data/lib/oci/core/models/create_route_table_details.rb +153 -0
- data/lib/oci/core/models/create_security_list_details.rb +164 -0
- data/lib/oci/core/models/create_subnet_details.rb +257 -0
- data/lib/oci/core/models/create_vcn_details.rb +171 -0
- data/lib/oci/core/models/create_virtual_circuit_details.rb +260 -0
- data/lib/oci/core/models/create_vnic_details.rb +214 -0
- data/lib/oci/core/models/create_volume_backup_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +170 -0
- data/lib/oci/core/models/cross_connect.rb +235 -0
- data/lib/oci/core/models/cross_connect_group.rb +187 -0
- data/lib/oci/core/models/cross_connect_location.rb +134 -0
- data/lib/oci/core/models/cross_connect_mapping.rb +190 -0
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +137 -0
- data/lib/oci/core/models/cross_connect_status.rb +200 -0
- data/lib/oci/core/models/dhcp_dns_option.rb +171 -0
- data/lib/oci/core/models/dhcp_option.rb +135 -0
- data/lib/oci/core/models/dhcp_options.rb +208 -0
- data/lib/oci/core/models/dhcp_search_domain_option.rb +141 -0
- data/lib/oci/core/models/drg.rb +186 -0
- data/lib/oci/core/models/drg_attachment.rb +208 -0
- data/lib/oci/core/models/egress_security_rule.rb +198 -0
- data/lib/oci/core/models/export_image_details.rb +134 -0
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oci/core/models/fast_connect_provider_service.rb +145 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +212 -0
- data/lib/oci/core/models/icmp_options.rb +131 -0
- data/lib/oci/core/models/image.rb +245 -0
- data/lib/oci/core/models/image_source_details.rb +134 -0
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oci/core/models/ingress_security_rule.rb +198 -0
- data/lib/oci/core/models/instance.rb +307 -0
- data/lib/oci/core/models/instance_console_connection.rb +193 -0
- data/lib/oci/core/models/instance_credentials.rb +131 -0
- data/lib/oci/core/models/internet_gateway.rb +210 -0
- data/lib/oci/core/models/ip_sec_connection.rb +223 -0
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +153 -0
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +156 -0
- data/lib/oci/core/models/launch_instance_details.rb +336 -0
- data/lib/oci/core/models/letter_of_authority.rb +194 -0
- data/lib/oci/core/models/port_range.rb +133 -0
- data/lib/oci/core/models/private_ip.rb +248 -0
- data/lib/oci/core/models/route_rule.rb +135 -0
- data/lib/oci/core/models/route_table.rb +208 -0
- data/lib/oci/core/models/security_list.rb +219 -0
- data/lib/oci/core/models/shape.rb +122 -0
- data/lib/oci/core/models/subnet.rb +351 -0
- data/lib/oci/core/models/tcp_options.rb +135 -0
- data/lib/oci/core/models/tunnel_config.rb +151 -0
- data/lib/oci/core/models/tunnel_status.rb +178 -0
- data/lib/oci/core/models/udp_options.rb +135 -0
- data/lib/oci/core/models/update_cpe_details.rb +122 -0
- data/lib/oci/core/models/update_cross_connect_details.rb +138 -0
- data/lib/oci/core/models/update_cross_connect_group_details.rb +122 -0
- data/lib/oci/core/models/update_dhcp_details.rb +132 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +122 -0
- data/lib/oci/core/models/update_drg_details.rb +122 -0
- data/lib/oci/core/models/update_image_details.rb +124 -0
- data/lib/oci/core/models/update_instance_details.rb +124 -0
- data/lib/oci/core/models/update_internet_gateway_details.rb +133 -0
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +157 -0
- data/lib/oci/core/models/update_route_table_details.rb +133 -0
- data/lib/oci/core/models/update_security_list_details.rb +144 -0
- data/lib/oci/core/models/update_subnet_details.rb +122 -0
- data/lib/oci/core/models/update_vcn_details.rb +122 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oci/core/models/update_vnic_details.rb +144 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +122 -0
- data/lib/oci/core/models/update_volume_details.rb +122 -0
- data/lib/oci/core/models/vcn.rb +276 -0
- data/lib/oci/core/models/virtual_circuit.rb +395 -0
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +137 -0
- data/lib/oci/core/models/vnic.rb +287 -0
- data/lib/oci/core/models/vnic_attachment.rb +250 -0
- data/lib/oci/core/models/volume.rb +210 -0
- data/lib/oci/core/models/volume_attachment.rb +246 -0
- data/lib/oci/core/models/volume_backup.rb +235 -0
- data/lib/oci/core/util.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +3421 -0
- data/lib/oci/errors.rb +78 -0
- data/lib/oci/global_context.rb +20 -0
- data/lib/oci/identity/identity.rb +55 -0
- data/lib/oci/identity/identity_client.rb +2148 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +131 -0
- data/lib/oci/identity/models/api_key.rb +211 -0
- data/lib/oci/identity/models/availability_domain.rb +131 -0
- data/lib/oci/identity/models/compartment.rb +211 -0
- data/lib/oci/identity/models/create_api_key_details.rb +120 -0
- data/lib/oci/identity/models/create_compartment_details.rb +145 -0
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +121 -0
- data/lib/oci/identity/models/create_group_details.rb +144 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +215 -0
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +133 -0
- data/lib/oci/identity/models/create_policy_details.rb +173 -0
- data/lib/oci/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +154 -0
- data/lib/oci/identity/models/create_swift_password_details.rb +121 -0
- data/lib/oci/identity/models/create_user_details.rb +144 -0
- data/lib/oci/identity/models/customer_secret_key.rb +225 -0
- data/lib/oci/identity/models/customer_secret_key_summary.rb +213 -0
- data/lib/oci/identity/models/group.rb +211 -0
- data/lib/oci/identity/models/identity_provider.rb +261 -0
- data/lib/oci/identity/models/idp_group_mapping.rb +220 -0
- data/lib/oci/identity/models/policy.rb +237 -0
- data/lib/oci/identity/models/region.rb +143 -0
- data/lib/oci/identity/models/region_subscription.rb +180 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +180 -0
- data/lib/oci/identity/models/swift_password.rb +226 -0
- data/lib/oci/identity/models/tenancy.rb +159 -0
- data/lib/oci/identity/models/ui_password.rb +187 -0
- data/lib/oci/identity/models/update_compartment_details.rb +132 -0
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +120 -0
- data/lib/oci/identity/models/update_group_details.rb +120 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +160 -0
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +131 -0
- data/lib/oci/identity/models/update_policy_details.rb +148 -0
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +145 -0
- data/lib/oci/identity/models/update_state_details.rb +121 -0
- data/lib/oci/identity/models/update_swift_password_details.rb +120 -0
- data/lib/oci/identity/models/update_user_details.rb +120 -0
- data/lib/oci/identity/models/user.rb +217 -0
- data/lib/oci/identity/models/user_group_membership.rb +209 -0
- data/lib/oci/identity/util.rb +1 -0
- data/lib/oci/internal/internal.rb +10 -0
- data/lib/oci/internal/util.rb +69 -0
- data/lib/oci/load_balancer/load_balancer.rb +51 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +1449 -0
- data/lib/oci/load_balancer/models/backend.rb +220 -0
- data/lib/oci/load_balancer/models/backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/backend_health.rb +158 -0
- data/lib/oci/load_balancer/models/backend_set.rb +182 -0
- data/lib/oci/load_balancer/models/backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/backend_set_health.rb +207 -0
- data/lib/oci/load_balancer/models/certificate.rb +169 -0
- data/lib/oci/load_balancer/models/certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +181 -0
- data/lib/oci/load_balancer/models/create_certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +175 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +220 -0
- data/lib/oci/load_balancer/models/health_check_result.rb +183 -0
- data/lib/oci/load_balancer/models/health_checker.rb +224 -0
- data/lib/oci/load_balancer/models/health_checker_details.rb +223 -0
- data/lib/oci/load_balancer/models/ip_address.rb +139 -0
- data/lib/oci/load_balancer/models/listener.rb +174 -0
- data/lib/oci/load_balancer/models/listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/load_balancer.rb +280 -0
- data/lib/oci/load_balancer/models/load_balancer_health.rb +215 -0
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +168 -0
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +120 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +141 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +155 -0
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +155 -0
- data/lib/oci/load_balancer/models/update_backend_details.rb +178 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +222 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +124 -0
- data/lib/oci/load_balancer/models/work_request.rb +229 -0
- data/lib/oci/load_balancer/models/work_request_error.rb +145 -0
- data/lib/oci/load_balancer/util.rb +58 -0
- data/lib/oci/object_storage/models/bucket.rb +216 -0
- data/lib/oci/object_storage/models/bucket_summary.rb +175 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +133 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +131 -0
- data/lib/oci/object_storage/models/create_bucket_details.rb +173 -0
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +166 -0
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +171 -0
- data/lib/oci/object_storage/models/list_objects.rb +146 -0
- data/lib/oci/object_storage/models/multipart_upload.rb +164 -0
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +153 -0
- data/lib/oci/object_storage/models/object_summary.rb +153 -0
- data/lib/oci/object_storage/models/preauthenticated_request.rb +207 -0
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +196 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +171 -0
- data/lib/oci/object_storage/object_storage.rb +30 -0
- data/lib/oci/object_storage/object_storage_client.rb +1185 -0
- data/lib/oci/object_storage/util.rb +1 -0
- data/lib/oci/regions.rb +43 -0
- data/lib/oci/response.rb +80 -0
- data/lib/oci/response_headers.rb +144 -0
- data/lib/oci/signer.rb +157 -0
- data/lib/oci/version.rb +5 -0
- data/lib/oci/waiter.rb +101 -0
- data/lib/oraclebmc.rb +3 -0
- metadata +375 -0
@@ -0,0 +1,153 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Core::Models::IPSecConnectionDeviceConfig
|
7
|
+
# The OCID of the compartment containing the IPSec connection.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :compartment_id
|
10
|
+
|
11
|
+
# The IPSec connection's Oracle ID (OCID).
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :id
|
14
|
+
|
15
|
+
# The date and time the IPSec connection was created.
|
16
|
+
# @return [DateTime]
|
17
|
+
attr_accessor :time_created
|
18
|
+
|
19
|
+
# Two {TunnelConfig} objects.
|
20
|
+
# @return [Array<OCI::Core::Models::TunnelConfig>]
|
21
|
+
attr_accessor :tunnels
|
22
|
+
|
23
|
+
|
24
|
+
# Initializes the object
|
25
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
26
|
+
def initialize(attributes = {})
|
27
|
+
return unless attributes.is_a?(Hash)
|
28
|
+
|
29
|
+
# convert string to symbol for hash key
|
30
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
31
|
+
|
32
|
+
if attributes[:'compartmentId']
|
33
|
+
self.compartment_id = attributes[:'compartmentId']
|
34
|
+
end
|
35
|
+
|
36
|
+
if attributes[:'id']
|
37
|
+
self.id = attributes[:'id']
|
38
|
+
end
|
39
|
+
|
40
|
+
if attributes[:'timeCreated']
|
41
|
+
self.time_created = attributes[:'timeCreated']
|
42
|
+
end
|
43
|
+
|
44
|
+
if attributes[:'tunnels']
|
45
|
+
self.tunnels = attributes[:'tunnels']
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
# Checks equality by comparing each attribute.
|
51
|
+
# @param [Object] other_object to be compared
|
52
|
+
def ==(other_object)
|
53
|
+
return true if self.equal?(other_object)
|
54
|
+
self.class == other_object.class &&
|
55
|
+
compartment_id == other_object.compartment_id &&
|
56
|
+
id == other_object.id &&
|
57
|
+
time_created == other_object.time_created &&
|
58
|
+
tunnels == other_object.tunnels
|
59
|
+
end
|
60
|
+
|
61
|
+
# @see the `==` method
|
62
|
+
# @param [Object] other_object to be compared
|
63
|
+
def eql?(other_object)
|
64
|
+
self == other_object
|
65
|
+
end
|
66
|
+
|
67
|
+
# Calculates hash code according to all attributes.
|
68
|
+
# @return [Fixnum] Hash code
|
69
|
+
def hash
|
70
|
+
[compartment_id, id, time_created, tunnels].hash
|
71
|
+
end
|
72
|
+
|
73
|
+
# Builds the object from hash
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
# @return [Object] Returns the model itself
|
76
|
+
def build_from_hash(attributes)
|
77
|
+
return nil unless attributes.is_a?(Hash)
|
78
|
+
self.class.swagger_types.each_pair do |key, type|
|
79
|
+
if type =~ /^Array<(.*)>/i
|
80
|
+
# check to ensure the input is an array given that the the attribute
|
81
|
+
# is documented as an array but the input is not
|
82
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
83
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
84
|
+
end
|
85
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
86
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
87
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
88
|
+
end
|
89
|
+
|
90
|
+
self
|
91
|
+
end
|
92
|
+
|
93
|
+
# Returns the string representation of the object
|
94
|
+
# @return [String] String presentation of the object
|
95
|
+
def to_s
|
96
|
+
to_hash.to_s
|
97
|
+
end
|
98
|
+
|
99
|
+
# Returns the object in the form of hash
|
100
|
+
# @return [Hash] Returns the object in the form of hash
|
101
|
+
def to_hash
|
102
|
+
hash = {}
|
103
|
+
self.class.attribute_map.each_pair do |attr, param|
|
104
|
+
value = self.send(attr)
|
105
|
+
next if value.nil?
|
106
|
+
hash[param] = _to_hash(value)
|
107
|
+
end
|
108
|
+
hash
|
109
|
+
end
|
110
|
+
|
111
|
+
private
|
112
|
+
|
113
|
+
# Outputs non-array value in the form of hash
|
114
|
+
# For object, use to_hash. Otherwise, just return the value
|
115
|
+
# @param [Object] value Any valid value
|
116
|
+
# @return [Hash] Returns the value in the form of hash
|
117
|
+
def _to_hash(value)
|
118
|
+
if value.is_a?(Array)
|
119
|
+
value.compact.map{ |v| _to_hash(v) }
|
120
|
+
elsif value.is_a?(Hash)
|
121
|
+
{}.tap do |hash|
|
122
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
123
|
+
end
|
124
|
+
elsif value.respond_to? :to_hash
|
125
|
+
value.to_hash
|
126
|
+
else
|
127
|
+
value
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
134
|
+
def self.attribute_map
|
135
|
+
{
|
136
|
+
:'compartment_id' => :'compartmentId',
|
137
|
+
:'id' => :'id',
|
138
|
+
:'time_created' => :'timeCreated',
|
139
|
+
:'tunnels' => :'tunnels'
|
140
|
+
}
|
141
|
+
end
|
142
|
+
|
143
|
+
# Attribute type mapping.
|
144
|
+
def self.swagger_types
|
145
|
+
{
|
146
|
+
:'compartment_id' => :'String',
|
147
|
+
:'id' => :'String',
|
148
|
+
:'time_created' => :'DateTime',
|
149
|
+
:'tunnels' => :'Array<OCI::Core::Models::TunnelConfig>'
|
150
|
+
}
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,156 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Core::Models::IPSecConnectionDeviceStatus
|
7
|
+
# The OCID of the compartment containing the IPSec connection.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :compartment_id
|
10
|
+
|
11
|
+
# The IPSec connection's Oracle ID (OCID).
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :id
|
14
|
+
|
15
|
+
# The date and time the IPSec connection was created, in the format defined by RFC3339.
|
16
|
+
#
|
17
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
18
|
+
#
|
19
|
+
# @return [DateTime]
|
20
|
+
attr_accessor :time_created
|
21
|
+
|
22
|
+
# Two {TunnelStatus} objects.
|
23
|
+
# @return [Array<OCI::Core::Models::TunnelStatus>]
|
24
|
+
attr_accessor :tunnels
|
25
|
+
|
26
|
+
|
27
|
+
# Initializes the object
|
28
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
29
|
+
def initialize(attributes = {})
|
30
|
+
return unless attributes.is_a?(Hash)
|
31
|
+
|
32
|
+
# convert string to symbol for hash key
|
33
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
34
|
+
|
35
|
+
if attributes[:'compartmentId']
|
36
|
+
self.compartment_id = attributes[:'compartmentId']
|
37
|
+
end
|
38
|
+
|
39
|
+
if attributes[:'id']
|
40
|
+
self.id = attributes[:'id']
|
41
|
+
end
|
42
|
+
|
43
|
+
if attributes[:'timeCreated']
|
44
|
+
self.time_created = attributes[:'timeCreated']
|
45
|
+
end
|
46
|
+
|
47
|
+
if attributes[:'tunnels']
|
48
|
+
self.tunnels = attributes[:'tunnels']
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
# Checks equality by comparing each attribute.
|
54
|
+
# @param [Object] other_object to be compared
|
55
|
+
def ==(other_object)
|
56
|
+
return true if self.equal?(other_object)
|
57
|
+
self.class == other_object.class &&
|
58
|
+
compartment_id == other_object.compartment_id &&
|
59
|
+
id == other_object.id &&
|
60
|
+
time_created == other_object.time_created &&
|
61
|
+
tunnels == other_object.tunnels
|
62
|
+
end
|
63
|
+
|
64
|
+
# @see the `==` method
|
65
|
+
# @param [Object] other_object to be compared
|
66
|
+
def eql?(other_object)
|
67
|
+
self == other_object
|
68
|
+
end
|
69
|
+
|
70
|
+
# Calculates hash code according to all attributes.
|
71
|
+
# @return [Fixnum] Hash code
|
72
|
+
def hash
|
73
|
+
[compartment_id, id, time_created, tunnels].hash
|
74
|
+
end
|
75
|
+
|
76
|
+
# Builds the object from hash
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
# @return [Object] Returns the model itself
|
79
|
+
def build_from_hash(attributes)
|
80
|
+
return nil unless attributes.is_a?(Hash)
|
81
|
+
self.class.swagger_types.each_pair do |key, type|
|
82
|
+
if type =~ /^Array<(.*)>/i
|
83
|
+
# check to ensure the input is an array given that the the attribute
|
84
|
+
# is documented as an array but the input is not
|
85
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
86
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
87
|
+
end
|
88
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
89
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
90
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
91
|
+
end
|
92
|
+
|
93
|
+
self
|
94
|
+
end
|
95
|
+
|
96
|
+
# Returns the string representation of the object
|
97
|
+
# @return [String] String presentation of the object
|
98
|
+
def to_s
|
99
|
+
to_hash.to_s
|
100
|
+
end
|
101
|
+
|
102
|
+
# Returns the object in the form of hash
|
103
|
+
# @return [Hash] Returns the object in the form of hash
|
104
|
+
def to_hash
|
105
|
+
hash = {}
|
106
|
+
self.class.attribute_map.each_pair do |attr, param|
|
107
|
+
value = self.send(attr)
|
108
|
+
next if value.nil?
|
109
|
+
hash[param] = _to_hash(value)
|
110
|
+
end
|
111
|
+
hash
|
112
|
+
end
|
113
|
+
|
114
|
+
private
|
115
|
+
|
116
|
+
# Outputs non-array value in the form of hash
|
117
|
+
# For object, use to_hash. Otherwise, just return the value
|
118
|
+
# @param [Object] value Any valid value
|
119
|
+
# @return [Hash] Returns the value in the form of hash
|
120
|
+
def _to_hash(value)
|
121
|
+
if value.is_a?(Array)
|
122
|
+
value.compact.map{ |v| _to_hash(v) }
|
123
|
+
elsif value.is_a?(Hash)
|
124
|
+
{}.tap do |hash|
|
125
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
126
|
+
end
|
127
|
+
elsif value.respond_to? :to_hash
|
128
|
+
value.to_hash
|
129
|
+
else
|
130
|
+
value
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
137
|
+
def self.attribute_map
|
138
|
+
{
|
139
|
+
:'compartment_id' => :'compartmentId',
|
140
|
+
:'id' => :'id',
|
141
|
+
:'time_created' => :'timeCreated',
|
142
|
+
:'tunnels' => :'tunnels'
|
143
|
+
}
|
144
|
+
end
|
145
|
+
|
146
|
+
# Attribute type mapping.
|
147
|
+
def self.swagger_types
|
148
|
+
{
|
149
|
+
:'compartment_id' => :'String',
|
150
|
+
:'id' => :'String',
|
151
|
+
:'time_created' => :'DateTime',
|
152
|
+
:'tunnels' => :'Array<OCI::Core::Models::TunnelStatus>'
|
153
|
+
}
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
@@ -0,0 +1,336 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Core::Models::LaunchInstanceDetails
|
7
|
+
# The Availability Domain of the instance.
|
8
|
+
#
|
9
|
+
# Example: `Uocm:PHX-AD-1`
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :availability_domain
|
13
|
+
|
14
|
+
# The OCID of the compartment.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :compartment_id
|
17
|
+
|
18
|
+
# Details for the primary VNIC, which is automatically created and attached when
|
19
|
+
# the instance is launched.
|
20
|
+
#
|
21
|
+
# @return [OCI::Core::Models::CreateVnicDetails]
|
22
|
+
attr_accessor :create_vnic_details
|
23
|
+
|
24
|
+
# A user-friendly name. Does not have to be unique, and it's changeable.
|
25
|
+
# Avoid entering confidential information.
|
26
|
+
#
|
27
|
+
# Example: `My bare metal instance`
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :display_name
|
31
|
+
|
32
|
+
# Additional metadata key/value pairs that you provide. They serve a similar purpose and functionality from fields in the 'metadata' object.
|
33
|
+
#
|
34
|
+
# They are distinguished from 'metadata' fields in that these can be nested JSON objects (whereas 'metadata' fields are string/string maps only).
|
35
|
+
#
|
36
|
+
# If you don't need nested metadata values, it is strongly advised to avoid using this object and use the Metadata object instead.
|
37
|
+
#
|
38
|
+
# @return [Hash<String, Object>]
|
39
|
+
attr_accessor :extended_metadata
|
40
|
+
|
41
|
+
# Deprecated. Instead use `hostnameLabel` in
|
42
|
+
# {CreateVnicDetails}.
|
43
|
+
# If you provide both, the values must match.
|
44
|
+
#
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :hostname_label
|
47
|
+
|
48
|
+
# The OCID of the image used to boot the instance.
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :image_id
|
51
|
+
|
52
|
+
# This is an advanced option.
|
53
|
+
#
|
54
|
+
# When an Oracle Bare Metal Cloud Services or virtual machine
|
55
|
+
# instance boots, the iPXE firmware that runs on the instance is
|
56
|
+
# configured to run an iPXE script to continue the boot process.
|
57
|
+
#
|
58
|
+
# If you want more control over the boot process, you can provide
|
59
|
+
# your own custom iPXE script that will run when the instance boots;
|
60
|
+
# however, you should be aware that the same iPXE script will run
|
61
|
+
# every time an instance boots; not only after the initial
|
62
|
+
# LaunchInstance call.
|
63
|
+
#
|
64
|
+
# The default iPXE script connects to the instance's local boot
|
65
|
+
# volume over iSCSI and performs a network boot. If you use a custom iPXE
|
66
|
+
# script and want to network-boot from the instance's local boot volume
|
67
|
+
# over iSCSI the same way as the default iPXE script, you should use the
|
68
|
+
# following iSCSI IP address: 169.254.0.2, and boot volume IQN:
|
69
|
+
# iqn.2015-02.oracle.boot.
|
70
|
+
#
|
71
|
+
# For more information about the Bring Your Own Image feature of
|
72
|
+
# Oracle Bare Metal Cloud Services, see
|
73
|
+
# [Bring Your Own Image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm).
|
74
|
+
#
|
75
|
+
# For more information about iPXE, see http://ipxe.org.
|
76
|
+
#
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :ipxe_script
|
79
|
+
|
80
|
+
# Custom metadata key/value pairs that you provide, such as the SSH public key
|
81
|
+
# required to connect to the instance.
|
82
|
+
#
|
83
|
+
# A metadata service runs on every launched instance. The service is an HTTP
|
84
|
+
# endpoint listening on 169.254.169.254. You can use the service to:
|
85
|
+
#
|
86
|
+
# * Provide information to [Cloud-Init](https://cloudinit.readthedocs.org/en/latest/)
|
87
|
+
# to be used for various system initialization tasks.
|
88
|
+
#
|
89
|
+
# * Get information about the instance, including the custom metadata that you
|
90
|
+
# provide when you launch the instance.
|
91
|
+
#
|
92
|
+
# **Providing Cloud-Init Metadata**
|
93
|
+
#
|
94
|
+
# You can use the following metadata key names to provide information to
|
95
|
+
# Cloud-Init:
|
96
|
+
#
|
97
|
+
# **\"ssh_authorized_keys\"** - Provide one or more public SSH keys to be
|
98
|
+
# included in the `~/.ssh/authorized_keys` file for the default user on the
|
99
|
+
# instance. Use a newline character to separate multiple keys. The SSH
|
100
|
+
# keys must be in the format necessary for the `authorized_keys` file, as shown
|
101
|
+
# in the example below.
|
102
|
+
#
|
103
|
+
# **\"user_data\"** - Provide your own base64-encoded data to be used by
|
104
|
+
# Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. For
|
105
|
+
# information about how to take advantage of user data, see the
|
106
|
+
# [Cloud-Init Documentation](http://cloudinit.readthedocs.org/en/latest/topics/format.html).
|
107
|
+
#
|
108
|
+
# **Note:** Cloud-Init does not pull this data from the `http://169.254.169.254/opc/v1/instance/metadata/`
|
109
|
+
# path. When the instance launches and either of these keys are provided, the key values are formatted as
|
110
|
+
# OpenStack metadata and copied to the following locations, which are recognized by Cloud-Init:
|
111
|
+
#
|
112
|
+
# `http://169.254.169.254/openstack/latest/meta_data.json` - This JSON blob
|
113
|
+
# contains, among other things, the SSH keys that you provided for
|
114
|
+
# **\"ssh_authorized_keys\"**.
|
115
|
+
#
|
116
|
+
# `http://169.254.169.254/openstack/latest/user_data` - Contains the
|
117
|
+
# base64-decoded data that you provided for **\"user_data\"**.
|
118
|
+
#
|
119
|
+
# **Metadata Example**
|
120
|
+
#
|
121
|
+
# \"metadata\" : {
|
122
|
+
# \"quake_bot_level\" : \"Severe\",
|
123
|
+
# \"ssh_authorized_keys\" : \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCZ06fccNTQfq+xubFlJ5ZR3kt+uzspdH9tXL+lAejSM1NXM+CFZev7MIxfEjas06y80ZBZ7DUTQO0GxJPeD8NCOb1VorF8M4xuLwrmzRtkoZzU16umt4y1W0Q4ifdp3IiiU0U8/WxczSXcUVZOLqkz5dc6oMHdMVpkimietWzGZ4LBBsH/LjEVY7E0V+a0sNchlVDIZcm7ErReBLcdTGDq0uLBiuChyl6RUkX1PNhusquTGwK7zc8OBXkRuubn5UKXhI3Ul9Nyk4XESkVWIGNKmw8mSpoJSjR8P9ZjRmcZVo8S+x4KVPMZKQEor== ryan.smith@company.com
|
124
|
+
# ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAzJSAtwEPoB3Jmr58IXrDGzLuDYkWAYg8AsLYlo6JZvKpjY1xednIcfEVQJm4T2DhVmdWhRrwQ8DmayVZvBkLt+zs2LdoAJEVimKwXcJFD/7wtH8Lnk17HiglbbbNXsemjDY0hea4JUE5CfvkIdZBITuMrfqSmA4n3VNoorXYdvtTMoGG8fxMub46RPtuxtqi9bG9Zqenordkg5FJt2mVNfQRqf83CWojcOkklUWq4CjyxaeLf5i9gv1fRoBo4QhiA8I6NCSppO8GnoV/6Ox6TNoh9BiifqGKC9VGYuC89RvUajRBTZSK2TK4DPfaT+2R+slPsFrwiT/oPEhhEK1S5Q== rsa-key-20160227\",
|
125
|
+
# \"user_data\" : \"SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg==\"
|
126
|
+
# }
|
127
|
+
# **Getting Metadata on the Instance**
|
128
|
+
#
|
129
|
+
# To get information about your instance, connect to the instance using SSH and issue any of the
|
130
|
+
# following GET requests:
|
131
|
+
#
|
132
|
+
# curl http://169.254.169.254/opc/v1/instance/
|
133
|
+
# curl http://169.254.169.254/opc/v1/instance/metadata/
|
134
|
+
# curl http://169.254.169.254/opc/v1/instance/metadata/<any-key-name>
|
135
|
+
#
|
136
|
+
# You'll get back a response that includes all the instance information; only the metadata information; or
|
137
|
+
# the metadata information for the specified key name, respectively.
|
138
|
+
#
|
139
|
+
# @return [Hash<String, String>]
|
140
|
+
attr_accessor :metadata
|
141
|
+
|
142
|
+
# The shape of an instance. The shape determines the number of CPUs, amount of memory,
|
143
|
+
# and other resources allocated to the instance.
|
144
|
+
#
|
145
|
+
# You can enumerate all available shapes by calling {#list_shapes list_shapes}.
|
146
|
+
#
|
147
|
+
# @return [String]
|
148
|
+
attr_accessor :shape
|
149
|
+
|
150
|
+
# Deprecated. Instead use `subnetId` in
|
151
|
+
# {CreateVnicDetails}.
|
152
|
+
# At least one of them is required; if you provide both, the values must match.
|
153
|
+
#
|
154
|
+
# @return [String]
|
155
|
+
attr_accessor :subnet_id
|
156
|
+
|
157
|
+
|
158
|
+
# Initializes the object
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
def initialize(attributes = {})
|
161
|
+
return unless attributes.is_a?(Hash)
|
162
|
+
|
163
|
+
# convert string to symbol for hash key
|
164
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
165
|
+
|
166
|
+
if attributes[:'availabilityDomain']
|
167
|
+
self.availability_domain = attributes[:'availabilityDomain']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes[:'compartmentId']
|
171
|
+
self.compartment_id = attributes[:'compartmentId']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes[:'createVnicDetails']
|
175
|
+
self.create_vnic_details = attributes[:'createVnicDetails']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes[:'displayName']
|
179
|
+
self.display_name = attributes[:'displayName']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes[:'extendedMetadata']
|
183
|
+
self.extended_metadata = attributes[:'extendedMetadata']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes[:'hostnameLabel']
|
187
|
+
self.hostname_label = attributes[:'hostnameLabel']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes[:'imageId']
|
191
|
+
self.image_id = attributes[:'imageId']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes[:'ipxeScript']
|
195
|
+
self.ipxe_script = attributes[:'ipxeScript']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes[:'metadata']
|
199
|
+
self.metadata = attributes[:'metadata']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes[:'shape']
|
203
|
+
self.shape = attributes[:'shape']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes[:'subnetId']
|
207
|
+
self.subnet_id = attributes[:'subnetId']
|
208
|
+
end
|
209
|
+
|
210
|
+
end
|
211
|
+
|
212
|
+
# Checks equality by comparing each attribute.
|
213
|
+
# @param [Object] other_object to be compared
|
214
|
+
def ==(other_object)
|
215
|
+
return true if self.equal?(other_object)
|
216
|
+
self.class == other_object.class &&
|
217
|
+
availability_domain == other_object.availability_domain &&
|
218
|
+
compartment_id == other_object.compartment_id &&
|
219
|
+
create_vnic_details == other_object.create_vnic_details &&
|
220
|
+
display_name == other_object.display_name &&
|
221
|
+
extended_metadata == other_object.extended_metadata &&
|
222
|
+
hostname_label == other_object.hostname_label &&
|
223
|
+
image_id == other_object.image_id &&
|
224
|
+
ipxe_script == other_object.ipxe_script &&
|
225
|
+
metadata == other_object.metadata &&
|
226
|
+
shape == other_object.shape &&
|
227
|
+
subnet_id == other_object.subnet_id
|
228
|
+
end
|
229
|
+
|
230
|
+
# @see the `==` method
|
231
|
+
# @param [Object] other_object to be compared
|
232
|
+
def eql?(other_object)
|
233
|
+
self == other_object
|
234
|
+
end
|
235
|
+
|
236
|
+
# Calculates hash code according to all attributes.
|
237
|
+
# @return [Fixnum] Hash code
|
238
|
+
def hash
|
239
|
+
[availability_domain, compartment_id, create_vnic_details, display_name, extended_metadata, hostname_label, image_id, ipxe_script, metadata, shape, subnet_id].hash
|
240
|
+
end
|
241
|
+
|
242
|
+
# Builds the object from hash
|
243
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
244
|
+
# @return [Object] Returns the model itself
|
245
|
+
def build_from_hash(attributes)
|
246
|
+
return nil unless attributes.is_a?(Hash)
|
247
|
+
self.class.swagger_types.each_pair do |key, type|
|
248
|
+
if type =~ /^Array<(.*)>/i
|
249
|
+
# check to ensure the input is an array given that the the attribute
|
250
|
+
# is documented as an array but the input is not
|
251
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
252
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
253
|
+
end
|
254
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
255
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
256
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
257
|
+
end
|
258
|
+
|
259
|
+
self
|
260
|
+
end
|
261
|
+
|
262
|
+
# Returns the string representation of the object
|
263
|
+
# @return [String] String presentation of the object
|
264
|
+
def to_s
|
265
|
+
to_hash.to_s
|
266
|
+
end
|
267
|
+
|
268
|
+
# Returns the object in the form of hash
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
270
|
+
def to_hash
|
271
|
+
hash = {}
|
272
|
+
self.class.attribute_map.each_pair do |attr, param|
|
273
|
+
value = self.send(attr)
|
274
|
+
next if value.nil?
|
275
|
+
hash[param] = _to_hash(value)
|
276
|
+
end
|
277
|
+
hash
|
278
|
+
end
|
279
|
+
|
280
|
+
private
|
281
|
+
|
282
|
+
# Outputs non-array value in the form of hash
|
283
|
+
# For object, use to_hash. Otherwise, just return the value
|
284
|
+
# @param [Object] value Any valid value
|
285
|
+
# @return [Hash] Returns the value in the form of hash
|
286
|
+
def _to_hash(value)
|
287
|
+
if value.is_a?(Array)
|
288
|
+
value.compact.map{ |v| _to_hash(v) }
|
289
|
+
elsif value.is_a?(Hash)
|
290
|
+
{}.tap do |hash|
|
291
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
292
|
+
end
|
293
|
+
elsif value.respond_to? :to_hash
|
294
|
+
value.to_hash
|
295
|
+
else
|
296
|
+
value
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
303
|
+
def self.attribute_map
|
304
|
+
{
|
305
|
+
:'availability_domain' => :'availabilityDomain',
|
306
|
+
:'compartment_id' => :'compartmentId',
|
307
|
+
:'create_vnic_details' => :'createVnicDetails',
|
308
|
+
:'display_name' => :'displayName',
|
309
|
+
:'extended_metadata' => :'extendedMetadata',
|
310
|
+
:'hostname_label' => :'hostnameLabel',
|
311
|
+
:'image_id' => :'imageId',
|
312
|
+
:'ipxe_script' => :'ipxeScript',
|
313
|
+
:'metadata' => :'metadata',
|
314
|
+
:'shape' => :'shape',
|
315
|
+
:'subnet_id' => :'subnetId'
|
316
|
+
}
|
317
|
+
end
|
318
|
+
|
319
|
+
# Attribute type mapping.
|
320
|
+
def self.swagger_types
|
321
|
+
{
|
322
|
+
:'availability_domain' => :'String',
|
323
|
+
:'compartment_id' => :'String',
|
324
|
+
:'create_vnic_details' => :'OCI::Core::Models::CreateVnicDetails',
|
325
|
+
:'display_name' => :'String',
|
326
|
+
:'extended_metadata' => :'Hash<String, Object>',
|
327
|
+
:'hostname_label' => :'String',
|
328
|
+
:'image_id' => :'String',
|
329
|
+
:'ipxe_script' => :'String',
|
330
|
+
:'metadata' => :'Hash<String, String>',
|
331
|
+
:'shape' => :'String',
|
332
|
+
:'subnet_id' => :'String'
|
333
|
+
}
|
334
|
+
end
|
335
|
+
end
|
336
|
+
end
|