oraclebmc 1.2.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{README.md → README_BMCS.md} +21 -26
- data/lib/oraclebmc.rb +1 -19
- metadata +16 -259
- data/lib/oraclebmc/api_client.rb +0 -306
- data/lib/oraclebmc/config.rb +0 -80
- data/lib/oraclebmc/config_file_loader.rb +0 -85
- data/lib/oraclebmc/core/blockstorage_client.rb +0 -460
- data/lib/oraclebmc/core/compute_client.rb +0 -1267
- data/lib/oraclebmc/core/core.rb +0 -112
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +0 -137
- data/lib/oraclebmc/core/models/attach_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/attach_volume_details.rb +0 -165
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +0 -120
- data/lib/oraclebmc/core/models/console_history.rb +0 -213
- data/lib/oraclebmc/core/models/cpe.rb +0 -169
- data/lib/oraclebmc/core/models/create_cpe_details.rb +0 -145
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +0 -204
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +0 -142
- data/lib/oraclebmc/core/models/create_drg_details.rb +0 -131
- data/lib/oraclebmc/core/models/create_image_details.rb +0 -159
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +0 -168
- data/lib/oraclebmc/core/models/create_private_ip_details.rb +0 -173
- data/lib/oraclebmc/core/models/create_route_table_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_security_list_details.rb +0 -164
- data/lib/oraclebmc/core/models/create_subnet_details.rb +0 -257
- data/lib/oraclebmc/core/models/create_vcn_details.rb +0 -171
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +0 -260
- data/lib/oraclebmc/core/models/create_vnic_details.rb +0 -214
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_volume_details.rb +0 -170
- data/lib/oraclebmc/core/models/cross_connect.rb +0 -235
- data/lib/oraclebmc/core/models/cross_connect_group.rb +0 -187
- data/lib/oraclebmc/core/models/cross_connect_location.rb +0 -134
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +0 -190
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +0 -137
- data/lib/oraclebmc/core/models/cross_connect_status.rb +0 -200
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +0 -171
- data/lib/oraclebmc/core/models/dhcp_option.rb +0 -135
- data/lib/oraclebmc/core/models/dhcp_options.rb +0 -208
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +0 -141
- data/lib/oraclebmc/core/models/drg.rb +0 -186
- data/lib/oraclebmc/core/models/drg_attachment.rb +0 -208
- data/lib/oraclebmc/core/models/egress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/export_image_details.rb +0 -134
- data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +0 -130
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +0 -145
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +0 -212
- data/lib/oraclebmc/core/models/icmp_options.rb +0 -131
- data/lib/oraclebmc/core/models/image.rb +0 -245
- data/lib/oraclebmc/core/models/image_source_details.rb +0 -134
- data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +0 -128
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/instance.rb +0 -307
- data/lib/oraclebmc/core/models/instance_credentials.rb +0 -131
- data/lib/oraclebmc/core/models/internet_gateway.rb +0 -210
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +0 -223
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +0 -153
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +0 -156
- data/lib/oraclebmc/core/models/launch_instance_details.rb +0 -336
- data/lib/oraclebmc/core/models/letter_of_authority.rb +0 -194
- data/lib/oraclebmc/core/models/port_range.rb +0 -133
- data/lib/oraclebmc/core/models/private_ip.rb +0 -248
- data/lib/oraclebmc/core/models/route_rule.rb +0 -135
- data/lib/oraclebmc/core/models/route_table.rb +0 -208
- data/lib/oraclebmc/core/models/security_list.rb +0 -219
- data/lib/oraclebmc/core/models/shape.rb +0 -122
- data/lib/oraclebmc/core/models/subnet.rb +0 -351
- data/lib/oraclebmc/core/models/tcp_options.rb +0 -135
- data/lib/oraclebmc/core/models/tunnel_config.rb +0 -151
- data/lib/oraclebmc/core/models/tunnel_status.rb +0 -178
- data/lib/oraclebmc/core/models/udp_options.rb +0 -135
- data/lib/oraclebmc/core/models/update_cpe_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +0 -138
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +0 -132
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_drg_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_image_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_instance_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_private_ip_details.rb +0 -157
- data/lib/oraclebmc/core/models/update_route_table_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_security_list_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_subnet_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_vcn_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +0 -240
- data/lib/oraclebmc/core/models/update_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_volume_details.rb +0 -122
- data/lib/oraclebmc/core/models/vcn.rb +0 -276
- data/lib/oraclebmc/core/models/virtual_circuit.rb +0 -395
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +0 -137
- data/lib/oraclebmc/core/models/vnic.rb +0 -287
- data/lib/oraclebmc/core/models/vnic_attachment.rb +0 -250
- data/lib/oraclebmc/core/models/volume.rb +0 -210
- data/lib/oraclebmc/core/models/volume_attachment.rb +0 -246
- data/lib/oraclebmc/core/models/volume_backup.rb +0 -235
- data/lib/oraclebmc/core/util.rb +0 -1
- data/lib/oraclebmc/core/virtual_network_client.rb +0 -3419
- data/lib/oraclebmc/errors.rb +0 -80
- data/lib/oraclebmc/global_context.rb +0 -21
- data/lib/oraclebmc/identity/identity.rb +0 -51
- data/lib/oraclebmc/identity/identity_client.rb +0 -1983
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +0 -131
- data/lib/oraclebmc/identity/models/api_key.rb +0 -211
- data/lib/oraclebmc/identity/models/availability_domain.rb +0 -131
- data/lib/oraclebmc/identity/models/compartment.rb +0 -211
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +0 -120
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +0 -145
- data/lib/oraclebmc/identity/models/create_group_details.rb +0 -144
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +0 -212
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +0 -133
- data/lib/oraclebmc/identity/models/create_policy_details.rb +0 -173
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +0 -127
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +0 -154
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +0 -121
- data/lib/oraclebmc/identity/models/create_user_details.rb +0 -144
- data/lib/oraclebmc/identity/models/group.rb +0 -211
- data/lib/oraclebmc/identity/models/identity_provider.rb +0 -256
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +0 -220
- data/lib/oraclebmc/identity/models/policy.rb +0 -237
- data/lib/oraclebmc/identity/models/region.rb +0 -141
- data/lib/oraclebmc/identity/models/region_subscription.rb +0 -178
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +0 -180
- data/lib/oraclebmc/identity/models/swift_password.rb +0 -226
- data/lib/oraclebmc/identity/models/tenancy.rb +0 -158
- data/lib/oraclebmc/identity/models/ui_password.rb +0 -187
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_group_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +0 -160
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +0 -131
- data/lib/oraclebmc/identity/models/update_policy_details.rb +0 -148
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +0 -145
- data/lib/oraclebmc/identity/models/update_state_details.rb +0 -121
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_user_details.rb +0 -120
- data/lib/oraclebmc/identity/models/user.rb +0 -217
- data/lib/oraclebmc/identity/models/user_group_membership.rb +0 -209
- data/lib/oraclebmc/identity/util.rb +0 -1
- data/lib/oraclebmc/internal/internal.rb +0 -11
- data/lib/oraclebmc/internal/util.rb +0 -69
- data/lib/oraclebmc/load_balancer/load_balancer.rb +0 -46
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +0 -1281
- data/lib/oraclebmc/load_balancer/models/backend.rb +0 -220
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +0 -179
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/certificate.rb +0 -167
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +0 -219
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +0 -223
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +0 -222
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +0 -139
- data/lib/oraclebmc/load_balancer/models/listener.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +0 -280
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +0 -141
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +0 -221
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +0 -123
- data/lib/oraclebmc/load_balancer/models/work_request.rb +0 -229
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +0 -145
- data/lib/oraclebmc/load_balancer/util.rb +0 -55
- data/lib/oraclebmc/regions.rb +0 -41
- data/lib/oraclebmc/response.rb +0 -86
- data/lib/oraclebmc/signer.rb +0 -119
- data/lib/oraclebmc/version.rb +0 -5
- data/lib/oraclebmc/waiter.rb +0 -111
@@ -1,287 +0,0 @@
|
|
1
|
-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
module OracleBMC
|
6
|
-
class Core::Models::Vnic
|
7
|
-
|
8
|
-
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING',
|
9
|
-
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE',
|
10
|
-
LIFECYCLE_STATE_TERMINATING = 'TERMINATING',
|
11
|
-
LIFECYCLE_STATE_TERMINATED = 'TERMINATED',
|
12
|
-
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
13
|
-
|
14
|
-
# The VNIC's Availability Domain.
|
15
|
-
#
|
16
|
-
# Example: `Uocm:PHX-AD-1`
|
17
|
-
#
|
18
|
-
# @return [String]
|
19
|
-
attr_accessor :availability_domain
|
20
|
-
|
21
|
-
# The OCID of the compartment containing the VNIC.
|
22
|
-
# @return [String]
|
23
|
-
attr_accessor :compartment_id
|
24
|
-
|
25
|
-
# A user-friendly name. Does not have to be unique.
|
26
|
-
# Avoid entering confidential information.
|
27
|
-
#
|
28
|
-
# @return [String]
|
29
|
-
attr_accessor :display_name
|
30
|
-
|
31
|
-
# The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname
|
32
|
-
# portion of the primary private IP's fully qualified domain name (FQDN)
|
33
|
-
# (e.g., `bminstance-1` in FQDN `bminstance-1.subnet123.vcn1.oraclevcn.com`).
|
34
|
-
# Must be unique across all VNICs in the subnet and comply with
|
35
|
-
# [RFC 952](https://tools.ietf.org/html/rfc952) and
|
36
|
-
# [RFC 1123](https://tools.ietf.org/html/rfc1123).
|
37
|
-
#
|
38
|
-
# For more information, see
|
39
|
-
# [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
|
40
|
-
#
|
41
|
-
# Example: `bminstance-1`
|
42
|
-
#
|
43
|
-
# @return [String]
|
44
|
-
attr_accessor :hostname_label
|
45
|
-
|
46
|
-
# The OCID of the VNIC.
|
47
|
-
# @return [String]
|
48
|
-
attr_accessor :id
|
49
|
-
|
50
|
-
# Whether the VNIC is the primary VNIC (the VNIC that is automatically created
|
51
|
-
# and attached during instance launch).
|
52
|
-
#
|
53
|
-
# @return [BOOLEAN]
|
54
|
-
attr_accessor :is_primary
|
55
|
-
|
56
|
-
# The current state of the VNIC.
|
57
|
-
# @return [String]
|
58
|
-
attr_accessor :lifecycle_state
|
59
|
-
|
60
|
-
# The MAC address of the VNIC.
|
61
|
-
#
|
62
|
-
# Example: `00:00:17:B6:4D:DD`
|
63
|
-
#
|
64
|
-
# @return [String]
|
65
|
-
attr_accessor :mac_address
|
66
|
-
|
67
|
-
# The private IP address of the primary `privateIp` object on the VNIC.
|
68
|
-
# The address is within the CIDR of the VNIC's subnet.
|
69
|
-
#
|
70
|
-
# Example: `10.0.3.3`
|
71
|
-
#
|
72
|
-
# @return [String]
|
73
|
-
attr_accessor :private_ip
|
74
|
-
|
75
|
-
# The public IP address of the VNIC, if one is assigned.
|
76
|
-
#
|
77
|
-
# @return [String]
|
78
|
-
attr_accessor :public_ip
|
79
|
-
|
80
|
-
# The OCID of the subnet the VNIC is in.
|
81
|
-
# @return [String]
|
82
|
-
attr_accessor :subnet_id
|
83
|
-
|
84
|
-
# The date and time the VNIC was created, in the format defined by RFC3339.
|
85
|
-
#
|
86
|
-
# Example: `2016-08-25T21:10:29.600Z`
|
87
|
-
#
|
88
|
-
# @return [DateTime]
|
89
|
-
attr_accessor :time_created
|
90
|
-
|
91
|
-
|
92
|
-
# Initializes the object
|
93
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
94
|
-
def initialize(attributes = {})
|
95
|
-
return unless attributes.is_a?(Hash)
|
96
|
-
|
97
|
-
# convert string to symbol for hash key
|
98
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
99
|
-
|
100
|
-
if attributes[:'availabilityDomain']
|
101
|
-
self.availability_domain = attributes[:'availabilityDomain']
|
102
|
-
end
|
103
|
-
|
104
|
-
if attributes[:'compartmentId']
|
105
|
-
self.compartment_id = attributes[:'compartmentId']
|
106
|
-
end
|
107
|
-
|
108
|
-
if attributes[:'displayName']
|
109
|
-
self.display_name = attributes[:'displayName']
|
110
|
-
end
|
111
|
-
|
112
|
-
if attributes[:'hostnameLabel']
|
113
|
-
self.hostname_label = attributes[:'hostnameLabel']
|
114
|
-
end
|
115
|
-
|
116
|
-
if attributes[:'id']
|
117
|
-
self.id = attributes[:'id']
|
118
|
-
end
|
119
|
-
|
120
|
-
if attributes[:'isPrimary']
|
121
|
-
self.is_primary = attributes[:'isPrimary']
|
122
|
-
end
|
123
|
-
|
124
|
-
if attributes[:'lifecycleState']
|
125
|
-
self.lifecycle_state = attributes[:'lifecycleState']
|
126
|
-
end
|
127
|
-
|
128
|
-
if attributes[:'macAddress']
|
129
|
-
self.mac_address = attributes[:'macAddress']
|
130
|
-
end
|
131
|
-
|
132
|
-
if attributes[:'privateIp']
|
133
|
-
self.private_ip = attributes[:'privateIp']
|
134
|
-
end
|
135
|
-
|
136
|
-
if attributes[:'publicIp']
|
137
|
-
self.public_ip = attributes[:'publicIp']
|
138
|
-
end
|
139
|
-
|
140
|
-
if attributes[:'subnetId']
|
141
|
-
self.subnet_id = attributes[:'subnetId']
|
142
|
-
end
|
143
|
-
|
144
|
-
if attributes[:'timeCreated']
|
145
|
-
self.time_created = attributes[:'timeCreated']
|
146
|
-
end
|
147
|
-
|
148
|
-
end
|
149
|
-
|
150
|
-
# Custom attribute writer method checking allowed values (enum).
|
151
|
-
# @param [Object] lifecycle_state Object to be assigned
|
152
|
-
def lifecycle_state=(lifecycle_state)
|
153
|
-
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
154
|
-
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
155
|
-
else
|
156
|
-
@lifecycle_state = lifecycle_state
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
|
-
# Checks equality by comparing each attribute.
|
161
|
-
# @param [Object] other_object to be compared
|
162
|
-
def ==(other_object)
|
163
|
-
return true if self.equal?(other_object)
|
164
|
-
self.class == other_object.class &&
|
165
|
-
availability_domain == other_object.availability_domain &&
|
166
|
-
compartment_id == other_object.compartment_id &&
|
167
|
-
display_name == other_object.display_name &&
|
168
|
-
hostname_label == other_object.hostname_label &&
|
169
|
-
id == other_object.id &&
|
170
|
-
is_primary == other_object.is_primary &&
|
171
|
-
lifecycle_state == other_object.lifecycle_state &&
|
172
|
-
mac_address == other_object.mac_address &&
|
173
|
-
private_ip == other_object.private_ip &&
|
174
|
-
public_ip == other_object.public_ip &&
|
175
|
-
subnet_id == other_object.subnet_id &&
|
176
|
-
time_created == other_object.time_created
|
177
|
-
end
|
178
|
-
|
179
|
-
# @see the `==` method
|
180
|
-
# @param [Object] other_object to be compared
|
181
|
-
def eql?(other_object)
|
182
|
-
self == other_object
|
183
|
-
end
|
184
|
-
|
185
|
-
# Calculates hash code according to all attributes.
|
186
|
-
# @return [Fixnum] Hash code
|
187
|
-
def hash
|
188
|
-
[availability_domain, compartment_id, display_name, hostname_label, id, is_primary, lifecycle_state, mac_address, private_ip, public_ip, subnet_id, time_created].hash
|
189
|
-
end
|
190
|
-
|
191
|
-
# Builds the object from hash
|
192
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
193
|
-
# @return [Object] Returns the model itself
|
194
|
-
def build_from_hash(attributes)
|
195
|
-
return nil unless attributes.is_a?(Hash)
|
196
|
-
self.class.swagger_types.each_pair do |key, type|
|
197
|
-
if type =~ /^Array<(.*)>/i
|
198
|
-
# check to ensure the input is an array given that the the attribute
|
199
|
-
# is documented as an array but the input is not
|
200
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
201
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
202
|
-
end
|
203
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
204
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
205
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
206
|
-
end
|
207
|
-
|
208
|
-
self
|
209
|
-
end
|
210
|
-
|
211
|
-
# Returns the string representation of the object
|
212
|
-
# @return [String] String presentation of the object
|
213
|
-
def to_s
|
214
|
-
to_hash.to_s
|
215
|
-
end
|
216
|
-
|
217
|
-
# Returns the object in the form of hash
|
218
|
-
# @return [Hash] Returns the object in the form of hash
|
219
|
-
def to_hash
|
220
|
-
hash = {}
|
221
|
-
self.class.attribute_map.each_pair do |attr, param|
|
222
|
-
value = self.send(attr)
|
223
|
-
next if value.nil?
|
224
|
-
hash[param] = _to_hash(value)
|
225
|
-
end
|
226
|
-
hash
|
227
|
-
end
|
228
|
-
|
229
|
-
private
|
230
|
-
|
231
|
-
# Outputs non-array value in the form of hash
|
232
|
-
# For object, use to_hash. Otherwise, just return the value
|
233
|
-
# @param [Object] value Any valid value
|
234
|
-
# @return [Hash] Returns the value in the form of hash
|
235
|
-
def _to_hash(value)
|
236
|
-
if value.is_a?(Array)
|
237
|
-
value.compact.map{ |v| _to_hash(v) }
|
238
|
-
elsif value.is_a?(Hash)
|
239
|
-
{}.tap do |hash|
|
240
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
241
|
-
end
|
242
|
-
elsif value.respond_to? :to_hash
|
243
|
-
value.to_hash
|
244
|
-
else
|
245
|
-
value
|
246
|
-
end
|
247
|
-
end
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
252
|
-
def self.attribute_map
|
253
|
-
{
|
254
|
-
:'availability_domain' => :'availabilityDomain',
|
255
|
-
:'compartment_id' => :'compartmentId',
|
256
|
-
:'display_name' => :'displayName',
|
257
|
-
:'hostname_label' => :'hostnameLabel',
|
258
|
-
:'id' => :'id',
|
259
|
-
:'is_primary' => :'isPrimary',
|
260
|
-
:'lifecycle_state' => :'lifecycleState',
|
261
|
-
:'mac_address' => :'macAddress',
|
262
|
-
:'private_ip' => :'privateIp',
|
263
|
-
:'public_ip' => :'publicIp',
|
264
|
-
:'subnet_id' => :'subnetId',
|
265
|
-
:'time_created' => :'timeCreated'
|
266
|
-
}
|
267
|
-
end
|
268
|
-
|
269
|
-
# Attribute type mapping.
|
270
|
-
def self.swagger_types
|
271
|
-
{
|
272
|
-
:'availability_domain' => :'String',
|
273
|
-
:'compartment_id' => :'String',
|
274
|
-
:'display_name' => :'String',
|
275
|
-
:'hostname_label' => :'String',
|
276
|
-
:'id' => :'String',
|
277
|
-
:'is_primary' => :'BOOLEAN',
|
278
|
-
:'lifecycle_state' => :'String',
|
279
|
-
:'mac_address' => :'String',
|
280
|
-
:'private_ip' => :'String',
|
281
|
-
:'public_ip' => :'String',
|
282
|
-
:'subnet_id' => :'String',
|
283
|
-
:'time_created' => :'DateTime'
|
284
|
-
}
|
285
|
-
end
|
286
|
-
end
|
287
|
-
end
|
@@ -1,250 +0,0 @@
|
|
1
|
-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
module OracleBMC
|
6
|
-
class Core::Models::VnicAttachment
|
7
|
-
|
8
|
-
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_ATTACHING = 'ATTACHING',
|
9
|
-
LIFECYCLE_STATE_ATTACHED = 'ATTACHED',
|
10
|
-
LIFECYCLE_STATE_DETACHING = 'DETACHING',
|
11
|
-
LIFECYCLE_STATE_DETACHED = 'DETACHED',
|
12
|
-
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
13
|
-
|
14
|
-
# The Availability Domain of the instance.
|
15
|
-
#
|
16
|
-
# Example: `Uocm:PHX-AD-1`
|
17
|
-
#
|
18
|
-
# @return [String]
|
19
|
-
attr_accessor :availability_domain
|
20
|
-
|
21
|
-
# The OCID of the compartment the VNIC attachment is in, which is the same
|
22
|
-
# compartment the instance is in.
|
23
|
-
#
|
24
|
-
# @return [String]
|
25
|
-
attr_accessor :compartment_id
|
26
|
-
|
27
|
-
# A user-friendly name. Does not have to be unique.
|
28
|
-
# Avoid entering confidential information.
|
29
|
-
#
|
30
|
-
# @return [String]
|
31
|
-
attr_accessor :display_name
|
32
|
-
|
33
|
-
# The OCID of the VNIC attachment.
|
34
|
-
# @return [String]
|
35
|
-
attr_accessor :id
|
36
|
-
|
37
|
-
# The OCID of the instance.
|
38
|
-
# @return [String]
|
39
|
-
attr_accessor :instance_id
|
40
|
-
|
41
|
-
# The current state of the VNIC attachment.
|
42
|
-
# @return [String]
|
43
|
-
attr_accessor :lifecycle_state
|
44
|
-
|
45
|
-
# The OCID of the VNIC's subnet.
|
46
|
-
# @return [String]
|
47
|
-
attr_accessor :subnet_id
|
48
|
-
|
49
|
-
# The date and time the VNIC attachment was created, in the format defined by RFC3339.
|
50
|
-
#
|
51
|
-
# Example: `2016-08-25T21:10:29.600Z`
|
52
|
-
#
|
53
|
-
# @return [DateTime]
|
54
|
-
attr_accessor :time_created
|
55
|
-
|
56
|
-
# The Oracle-assigned VLAN tag of the attached VNIC. Available after the
|
57
|
-
# attachment process is complete.
|
58
|
-
#
|
59
|
-
# Example: `0`
|
60
|
-
#
|
61
|
-
# @return [Integer]
|
62
|
-
attr_accessor :vlan_tag
|
63
|
-
|
64
|
-
# The OCID of the VNIC. Available after the attachment process is complete.
|
65
|
-
# @return [String]
|
66
|
-
attr_accessor :vnic_id
|
67
|
-
|
68
|
-
|
69
|
-
# Initializes the object
|
70
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
71
|
-
def initialize(attributes = {})
|
72
|
-
return unless attributes.is_a?(Hash)
|
73
|
-
|
74
|
-
# convert string to symbol for hash key
|
75
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
76
|
-
|
77
|
-
if attributes[:'availabilityDomain']
|
78
|
-
self.availability_domain = attributes[:'availabilityDomain']
|
79
|
-
end
|
80
|
-
|
81
|
-
if attributes[:'compartmentId']
|
82
|
-
self.compartment_id = attributes[:'compartmentId']
|
83
|
-
end
|
84
|
-
|
85
|
-
if attributes[:'displayName']
|
86
|
-
self.display_name = attributes[:'displayName']
|
87
|
-
end
|
88
|
-
|
89
|
-
if attributes[:'id']
|
90
|
-
self.id = attributes[:'id']
|
91
|
-
end
|
92
|
-
|
93
|
-
if attributes[:'instanceId']
|
94
|
-
self.instance_id = attributes[:'instanceId']
|
95
|
-
end
|
96
|
-
|
97
|
-
if attributes[:'lifecycleState']
|
98
|
-
self.lifecycle_state = attributes[:'lifecycleState']
|
99
|
-
end
|
100
|
-
|
101
|
-
if attributes[:'subnetId']
|
102
|
-
self.subnet_id = attributes[:'subnetId']
|
103
|
-
end
|
104
|
-
|
105
|
-
if attributes[:'timeCreated']
|
106
|
-
self.time_created = attributes[:'timeCreated']
|
107
|
-
end
|
108
|
-
|
109
|
-
if attributes[:'vlanTag']
|
110
|
-
self.vlan_tag = attributes[:'vlanTag']
|
111
|
-
end
|
112
|
-
|
113
|
-
if attributes[:'vnicId']
|
114
|
-
self.vnic_id = attributes[:'vnicId']
|
115
|
-
end
|
116
|
-
|
117
|
-
end
|
118
|
-
|
119
|
-
# Custom attribute writer method checking allowed values (enum).
|
120
|
-
# @param [Object] lifecycle_state Object to be assigned
|
121
|
-
def lifecycle_state=(lifecycle_state)
|
122
|
-
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
123
|
-
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
124
|
-
else
|
125
|
-
@lifecycle_state = lifecycle_state
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
# Checks equality by comparing each attribute.
|
130
|
-
# @param [Object] other_object to be compared
|
131
|
-
def ==(other_object)
|
132
|
-
return true if self.equal?(other_object)
|
133
|
-
self.class == other_object.class &&
|
134
|
-
availability_domain == other_object.availability_domain &&
|
135
|
-
compartment_id == other_object.compartment_id &&
|
136
|
-
display_name == other_object.display_name &&
|
137
|
-
id == other_object.id &&
|
138
|
-
instance_id == other_object.instance_id &&
|
139
|
-
lifecycle_state == other_object.lifecycle_state &&
|
140
|
-
subnet_id == other_object.subnet_id &&
|
141
|
-
time_created == other_object.time_created &&
|
142
|
-
vlan_tag == other_object.vlan_tag &&
|
143
|
-
vnic_id == other_object.vnic_id
|
144
|
-
end
|
145
|
-
|
146
|
-
# @see the `==` method
|
147
|
-
# @param [Object] other_object to be compared
|
148
|
-
def eql?(other_object)
|
149
|
-
self == other_object
|
150
|
-
end
|
151
|
-
|
152
|
-
# Calculates hash code according to all attributes.
|
153
|
-
# @return [Fixnum] Hash code
|
154
|
-
def hash
|
155
|
-
[availability_domain, compartment_id, display_name, id, instance_id, lifecycle_state, subnet_id, time_created, vlan_tag, vnic_id].hash
|
156
|
-
end
|
157
|
-
|
158
|
-
# Builds the object from hash
|
159
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
-
# @return [Object] Returns the model itself
|
161
|
-
def build_from_hash(attributes)
|
162
|
-
return nil unless attributes.is_a?(Hash)
|
163
|
-
self.class.swagger_types.each_pair do |key, type|
|
164
|
-
if type =~ /^Array<(.*)>/i
|
165
|
-
# check to ensure the input is an array given that the the attribute
|
166
|
-
# is documented as an array but the input is not
|
167
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
168
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
169
|
-
end
|
170
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
171
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
172
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
173
|
-
end
|
174
|
-
|
175
|
-
self
|
176
|
-
end
|
177
|
-
|
178
|
-
# Returns the string representation of the object
|
179
|
-
# @return [String] String presentation of the object
|
180
|
-
def to_s
|
181
|
-
to_hash.to_s
|
182
|
-
end
|
183
|
-
|
184
|
-
# Returns the object in the form of hash
|
185
|
-
# @return [Hash] Returns the object in the form of hash
|
186
|
-
def to_hash
|
187
|
-
hash = {}
|
188
|
-
self.class.attribute_map.each_pair do |attr, param|
|
189
|
-
value = self.send(attr)
|
190
|
-
next if value.nil?
|
191
|
-
hash[param] = _to_hash(value)
|
192
|
-
end
|
193
|
-
hash
|
194
|
-
end
|
195
|
-
|
196
|
-
private
|
197
|
-
|
198
|
-
# Outputs non-array value in the form of hash
|
199
|
-
# For object, use to_hash. Otherwise, just return the value
|
200
|
-
# @param [Object] value Any valid value
|
201
|
-
# @return [Hash] Returns the value in the form of hash
|
202
|
-
def _to_hash(value)
|
203
|
-
if value.is_a?(Array)
|
204
|
-
value.compact.map{ |v| _to_hash(v) }
|
205
|
-
elsif value.is_a?(Hash)
|
206
|
-
{}.tap do |hash|
|
207
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
-
end
|
209
|
-
elsif value.respond_to? :to_hash
|
210
|
-
value.to_hash
|
211
|
-
else
|
212
|
-
value
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
219
|
-
def self.attribute_map
|
220
|
-
{
|
221
|
-
:'availability_domain' => :'availabilityDomain',
|
222
|
-
:'compartment_id' => :'compartmentId',
|
223
|
-
:'display_name' => :'displayName',
|
224
|
-
:'id' => :'id',
|
225
|
-
:'instance_id' => :'instanceId',
|
226
|
-
:'lifecycle_state' => :'lifecycleState',
|
227
|
-
:'subnet_id' => :'subnetId',
|
228
|
-
:'time_created' => :'timeCreated',
|
229
|
-
:'vlan_tag' => :'vlanTag',
|
230
|
-
:'vnic_id' => :'vnicId'
|
231
|
-
}
|
232
|
-
end
|
233
|
-
|
234
|
-
# Attribute type mapping.
|
235
|
-
def self.swagger_types
|
236
|
-
{
|
237
|
-
:'availability_domain' => :'String',
|
238
|
-
:'compartment_id' => :'String',
|
239
|
-
:'display_name' => :'String',
|
240
|
-
:'id' => :'String',
|
241
|
-
:'instance_id' => :'String',
|
242
|
-
:'lifecycle_state' => :'String',
|
243
|
-
:'subnet_id' => :'String',
|
244
|
-
:'time_created' => :'DateTime',
|
245
|
-
:'vlan_tag' => :'Integer',
|
246
|
-
:'vnic_id' => :'String'
|
247
|
-
}
|
248
|
-
end
|
249
|
-
end
|
250
|
-
end
|