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,220 +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 LoadBalancer::Models::Backend
|
7
|
-
# Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress
|
8
|
-
# traffic to this backend server unless all other backend servers not marked as \"backup\" fail the health check policy.
|
9
|
-
#
|
10
|
-
# Example: `true`
|
11
|
-
#
|
12
|
-
# @return [BOOLEAN]
|
13
|
-
attr_accessor :backup
|
14
|
-
|
15
|
-
# Whether the load balancer should drain this server. Servers marked \"drain\" receive no new
|
16
|
-
# incoming traffic.
|
17
|
-
#
|
18
|
-
# Example: `true`
|
19
|
-
#
|
20
|
-
# @return [BOOLEAN]
|
21
|
-
attr_accessor :drain
|
22
|
-
|
23
|
-
# The IP address of the backend server.
|
24
|
-
#
|
25
|
-
# Example: `10.10.10.4`
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
attr_accessor :ip_address
|
29
|
-
|
30
|
-
# A name to uniquely identify this backend server in the backend set.
|
31
|
-
#
|
32
|
-
# Example: `My first backend server`
|
33
|
-
#
|
34
|
-
# @return [String]
|
35
|
-
attr_accessor :name
|
36
|
-
|
37
|
-
# Whether the load balancer should treat this server as offline. Offline servers receive no incoming
|
38
|
-
# traffic.
|
39
|
-
#
|
40
|
-
# Example: `true`
|
41
|
-
#
|
42
|
-
# @return [BOOLEAN]
|
43
|
-
attr_accessor :offline
|
44
|
-
|
45
|
-
# The communication port for the backend server.
|
46
|
-
#
|
47
|
-
# Example: `8080`
|
48
|
-
#
|
49
|
-
# @return [Integer]
|
50
|
-
attr_accessor :port
|
51
|
-
|
52
|
-
# The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger
|
53
|
-
# proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections
|
54
|
-
# as a server weighted '1'.
|
55
|
-
# For more information on load balancing policies, see
|
56
|
-
# [How Load Balancing Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm).
|
57
|
-
#
|
58
|
-
# Example: `3`
|
59
|
-
#
|
60
|
-
# @return [Integer]
|
61
|
-
attr_accessor :weight
|
62
|
-
|
63
|
-
|
64
|
-
# Initializes the object
|
65
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
-
def initialize(attributes = {})
|
67
|
-
return unless attributes.is_a?(Hash)
|
68
|
-
|
69
|
-
# convert string to symbol for hash key
|
70
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
71
|
-
|
72
|
-
if attributes[:'backup']
|
73
|
-
self.backup = attributes[:'backup']
|
74
|
-
else
|
75
|
-
self.backup = false
|
76
|
-
end
|
77
|
-
|
78
|
-
if attributes[:'drain']
|
79
|
-
self.drain = attributes[:'drain']
|
80
|
-
else
|
81
|
-
self.drain = false
|
82
|
-
end
|
83
|
-
|
84
|
-
if attributes[:'ipAddress']
|
85
|
-
self.ip_address = attributes[:'ipAddress']
|
86
|
-
end
|
87
|
-
|
88
|
-
if attributes[:'name']
|
89
|
-
self.name = attributes[:'name']
|
90
|
-
end
|
91
|
-
|
92
|
-
if attributes[:'offline']
|
93
|
-
self.offline = attributes[:'offline']
|
94
|
-
else
|
95
|
-
self.offline = false
|
96
|
-
end
|
97
|
-
|
98
|
-
if attributes[:'port']
|
99
|
-
self.port = attributes[:'port']
|
100
|
-
end
|
101
|
-
|
102
|
-
if attributes[:'weight']
|
103
|
-
self.weight = attributes[:'weight']
|
104
|
-
end
|
105
|
-
|
106
|
-
end
|
107
|
-
|
108
|
-
# Checks equality by comparing each attribute.
|
109
|
-
# @param [Object] other_object to be compared
|
110
|
-
def ==(other_object)
|
111
|
-
return true if self.equal?(other_object)
|
112
|
-
self.class == other_object.class &&
|
113
|
-
backup == other_object.backup &&
|
114
|
-
drain == other_object.drain &&
|
115
|
-
ip_address == other_object.ip_address &&
|
116
|
-
name == other_object.name &&
|
117
|
-
offline == other_object.offline &&
|
118
|
-
port == other_object.port &&
|
119
|
-
weight == other_object.weight
|
120
|
-
end
|
121
|
-
|
122
|
-
# @see the `==` method
|
123
|
-
# @param [Object] other_object to be compared
|
124
|
-
def eql?(other_object)
|
125
|
-
self == other_object
|
126
|
-
end
|
127
|
-
|
128
|
-
# Calculates hash code according to all attributes.
|
129
|
-
# @return [Fixnum] Hash code
|
130
|
-
def hash
|
131
|
-
[backup, drain, ip_address, name, offline, port, weight].hash
|
132
|
-
end
|
133
|
-
|
134
|
-
# Builds the object from hash
|
135
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
136
|
-
# @return [Object] Returns the model itself
|
137
|
-
def build_from_hash(attributes)
|
138
|
-
return nil unless attributes.is_a?(Hash)
|
139
|
-
self.class.swagger_types.each_pair do |key, type|
|
140
|
-
if type =~ /^Array<(.*)>/i
|
141
|
-
# check to ensure the input is an array given that the the attribute
|
142
|
-
# is documented as an array but the input is not
|
143
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
144
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
145
|
-
end
|
146
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
147
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
148
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
149
|
-
end
|
150
|
-
|
151
|
-
self
|
152
|
-
end
|
153
|
-
|
154
|
-
# Returns the string representation of the object
|
155
|
-
# @return [String] String presentation of the object
|
156
|
-
def to_s
|
157
|
-
to_hash.to_s
|
158
|
-
end
|
159
|
-
|
160
|
-
# Returns the object in the form of hash
|
161
|
-
# @return [Hash] Returns the object in the form of hash
|
162
|
-
def to_hash
|
163
|
-
hash = {}
|
164
|
-
self.class.attribute_map.each_pair do |attr, param|
|
165
|
-
value = self.send(attr)
|
166
|
-
next if value.nil?
|
167
|
-
hash[param] = _to_hash(value)
|
168
|
-
end
|
169
|
-
hash
|
170
|
-
end
|
171
|
-
|
172
|
-
private
|
173
|
-
|
174
|
-
# Outputs non-array value in the form of hash
|
175
|
-
# For object, use to_hash. Otherwise, just return the value
|
176
|
-
# @param [Object] value Any valid value
|
177
|
-
# @return [Hash] Returns the value in the form of hash
|
178
|
-
def _to_hash(value)
|
179
|
-
if value.is_a?(Array)
|
180
|
-
value.compact.map{ |v| _to_hash(v) }
|
181
|
-
elsif value.is_a?(Hash)
|
182
|
-
{}.tap do |hash|
|
183
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
184
|
-
end
|
185
|
-
elsif value.respond_to? :to_hash
|
186
|
-
value.to_hash
|
187
|
-
else
|
188
|
-
value
|
189
|
-
end
|
190
|
-
end
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
195
|
-
def self.attribute_map
|
196
|
-
{
|
197
|
-
:'backup' => :'backup',
|
198
|
-
:'drain' => :'drain',
|
199
|
-
:'ip_address' => :'ipAddress',
|
200
|
-
:'name' => :'name',
|
201
|
-
:'offline' => :'offline',
|
202
|
-
:'port' => :'port',
|
203
|
-
:'weight' => :'weight'
|
204
|
-
}
|
205
|
-
end
|
206
|
-
|
207
|
-
# Attribute type mapping.
|
208
|
-
def self.swagger_types
|
209
|
-
{
|
210
|
-
:'backup' => :'BOOLEAN',
|
211
|
-
:'drain' => :'BOOLEAN',
|
212
|
-
:'ip_address' => :'String',
|
213
|
-
:'name' => :'String',
|
214
|
-
:'offline' => :'BOOLEAN',
|
215
|
-
:'port' => :'Integer',
|
216
|
-
:'weight' => :'Integer'
|
217
|
-
}
|
218
|
-
end
|
219
|
-
end
|
220
|
-
end
|
@@ -1,206 +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 LoadBalancer::Models::BackendDetails
|
7
|
-
# Whether the load balancer should treat this server as a backup unit. If `true`, the load balancer forwards no ingress
|
8
|
-
# traffic to this backend server unless all other backend servers not marked as \"backup\" fail the health check policy.
|
9
|
-
#
|
10
|
-
# Example: `true`
|
11
|
-
#
|
12
|
-
# @return [BOOLEAN]
|
13
|
-
attr_accessor :backup
|
14
|
-
|
15
|
-
# Whether the load balancer should drain this server. Servers marked \"drain\" receive no new
|
16
|
-
# incoming traffic.
|
17
|
-
#
|
18
|
-
# Example: `true`
|
19
|
-
#
|
20
|
-
# @return [BOOLEAN]
|
21
|
-
attr_accessor :drain
|
22
|
-
|
23
|
-
# The IP address of the backend server.
|
24
|
-
#
|
25
|
-
# Example: `10.10.10.4`
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
attr_accessor :ip_address
|
29
|
-
|
30
|
-
# Whether the load balancer should treat this server as offline. Offline servers receive no incoming
|
31
|
-
# traffic.
|
32
|
-
#
|
33
|
-
# Example: `true`
|
34
|
-
#
|
35
|
-
# @return [BOOLEAN]
|
36
|
-
attr_accessor :offline
|
37
|
-
|
38
|
-
# The communication port for the backend server.
|
39
|
-
#
|
40
|
-
# Example: `8080`
|
41
|
-
#
|
42
|
-
# @return [Integer]
|
43
|
-
attr_accessor :port
|
44
|
-
|
45
|
-
# The load balancing policy weight assigned to the server. Backend servers with a higher weight receive a larger
|
46
|
-
# proportion of incoming traffic. For example, a server weighted '3' receives 3 times the number of new connections
|
47
|
-
# as a server weighted '1'.
|
48
|
-
# For more information on load balancing policies, see
|
49
|
-
# [How Load Balancing Policies Work](https://docs.us-phoenix-1.oraclecloud.com/Content/Balance/Reference/lbpolicies.htm).
|
50
|
-
#
|
51
|
-
# Example: `3`
|
52
|
-
#
|
53
|
-
# @return [Integer]
|
54
|
-
attr_accessor :weight
|
55
|
-
|
56
|
-
|
57
|
-
# Initializes the object
|
58
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
-
def initialize(attributes = {})
|
60
|
-
return unless attributes.is_a?(Hash)
|
61
|
-
|
62
|
-
# convert string to symbol for hash key
|
63
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
64
|
-
|
65
|
-
if attributes[:'backup']
|
66
|
-
self.backup = attributes[:'backup']
|
67
|
-
else
|
68
|
-
self.backup = false
|
69
|
-
end
|
70
|
-
|
71
|
-
if attributes[:'drain']
|
72
|
-
self.drain = attributes[:'drain']
|
73
|
-
else
|
74
|
-
self.drain = false
|
75
|
-
end
|
76
|
-
|
77
|
-
if attributes[:'ipAddress']
|
78
|
-
self.ip_address = attributes[:'ipAddress']
|
79
|
-
end
|
80
|
-
|
81
|
-
if attributes[:'offline']
|
82
|
-
self.offline = attributes[:'offline']
|
83
|
-
else
|
84
|
-
self.offline = false
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes[:'port']
|
88
|
-
self.port = attributes[:'port']
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes[:'weight']
|
92
|
-
self.weight = attributes[:'weight']
|
93
|
-
end
|
94
|
-
|
95
|
-
end
|
96
|
-
|
97
|
-
# Checks equality by comparing each attribute.
|
98
|
-
# @param [Object] other_object to be compared
|
99
|
-
def ==(other_object)
|
100
|
-
return true if self.equal?(other_object)
|
101
|
-
self.class == other_object.class &&
|
102
|
-
backup == other_object.backup &&
|
103
|
-
drain == other_object.drain &&
|
104
|
-
ip_address == other_object.ip_address &&
|
105
|
-
offline == other_object.offline &&
|
106
|
-
port == other_object.port &&
|
107
|
-
weight == other_object.weight
|
108
|
-
end
|
109
|
-
|
110
|
-
# @see the `==` method
|
111
|
-
# @param [Object] other_object to be compared
|
112
|
-
def eql?(other_object)
|
113
|
-
self == other_object
|
114
|
-
end
|
115
|
-
|
116
|
-
# Calculates hash code according to all attributes.
|
117
|
-
# @return [Fixnum] Hash code
|
118
|
-
def hash
|
119
|
-
[backup, drain, ip_address, offline, port, weight].hash
|
120
|
-
end
|
121
|
-
|
122
|
-
# Builds the object from hash
|
123
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
-
# @return [Object] Returns the model itself
|
125
|
-
def build_from_hash(attributes)
|
126
|
-
return nil unless attributes.is_a?(Hash)
|
127
|
-
self.class.swagger_types.each_pair do |key, type|
|
128
|
-
if type =~ /^Array<(.*)>/i
|
129
|
-
# check to ensure the input is an array given that the the attribute
|
130
|
-
# is documented as an array but the input is not
|
131
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
132
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
133
|
-
end
|
134
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
135
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
136
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
137
|
-
end
|
138
|
-
|
139
|
-
self
|
140
|
-
end
|
141
|
-
|
142
|
-
# Returns the string representation of the object
|
143
|
-
# @return [String] String presentation of the object
|
144
|
-
def to_s
|
145
|
-
to_hash.to_s
|
146
|
-
end
|
147
|
-
|
148
|
-
# Returns the object in the form of hash
|
149
|
-
# @return [Hash] Returns the object in the form of hash
|
150
|
-
def to_hash
|
151
|
-
hash = {}
|
152
|
-
self.class.attribute_map.each_pair do |attr, param|
|
153
|
-
value = self.send(attr)
|
154
|
-
next if value.nil?
|
155
|
-
hash[param] = _to_hash(value)
|
156
|
-
end
|
157
|
-
hash
|
158
|
-
end
|
159
|
-
|
160
|
-
private
|
161
|
-
|
162
|
-
# Outputs non-array value in the form of hash
|
163
|
-
# For object, use to_hash. Otherwise, just return the value
|
164
|
-
# @param [Object] value Any valid value
|
165
|
-
# @return [Hash] Returns the value in the form of hash
|
166
|
-
def _to_hash(value)
|
167
|
-
if value.is_a?(Array)
|
168
|
-
value.compact.map{ |v| _to_hash(v) }
|
169
|
-
elsif value.is_a?(Hash)
|
170
|
-
{}.tap do |hash|
|
171
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
172
|
-
end
|
173
|
-
elsif value.respond_to? :to_hash
|
174
|
-
value.to_hash
|
175
|
-
else
|
176
|
-
value
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
183
|
-
def self.attribute_map
|
184
|
-
{
|
185
|
-
:'backup' => :'backup',
|
186
|
-
:'drain' => :'drain',
|
187
|
-
:'ip_address' => :'ipAddress',
|
188
|
-
:'offline' => :'offline',
|
189
|
-
:'port' => :'port',
|
190
|
-
:'weight' => :'weight'
|
191
|
-
}
|
192
|
-
end
|
193
|
-
|
194
|
-
# Attribute type mapping.
|
195
|
-
def self.swagger_types
|
196
|
-
{
|
197
|
-
:'backup' => :'BOOLEAN',
|
198
|
-
:'drain' => :'BOOLEAN',
|
199
|
-
:'ip_address' => :'String',
|
200
|
-
:'offline' => :'BOOLEAN',
|
201
|
-
:'port' => :'Integer',
|
202
|
-
:'weight' => :'Integer'
|
203
|
-
}
|
204
|
-
end
|
205
|
-
end
|
206
|
-
end
|
@@ -1,179 +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 LoadBalancer::Models::BackendSet
|
7
|
-
# @return [Array<OracleBMC::LoadBalancer::Models::Backend>]
|
8
|
-
attr_accessor :backends
|
9
|
-
|
10
|
-
# @return [OracleBMC::LoadBalancer::Models::HealthChecker]
|
11
|
-
attr_accessor :health_checker
|
12
|
-
|
13
|
-
# A friendly name for the backend set. It must be unique and it cannot be changed.
|
14
|
-
#
|
15
|
-
# Example: `My backend set`
|
16
|
-
#
|
17
|
-
# @return [String]
|
18
|
-
attr_accessor :name
|
19
|
-
|
20
|
-
# The load balancer policy for the backend set. The default load balancing policy is 'ROUND_ROBIN'
|
21
|
-
# To get a list of available policies, use the {#list_policies list_policies}
|
22
|
-
# operation.
|
23
|
-
#
|
24
|
-
# Example: `LEAST_CONNECTIONS`
|
25
|
-
#
|
26
|
-
# @return [String]
|
27
|
-
attr_accessor :policy
|
28
|
-
|
29
|
-
# @return [OracleBMC::LoadBalancer::Models::SessionPersistenceConfigurationDetails]
|
30
|
-
attr_accessor :session_persistence_configuration
|
31
|
-
|
32
|
-
# @return [OracleBMC::LoadBalancer::Models::SSLConfiguration]
|
33
|
-
attr_accessor :ssl_configuration
|
34
|
-
|
35
|
-
|
36
|
-
# Initializes the object
|
37
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
38
|
-
def initialize(attributes = {})
|
39
|
-
return unless attributes.is_a?(Hash)
|
40
|
-
|
41
|
-
# convert string to symbol for hash key
|
42
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
43
|
-
|
44
|
-
if attributes[:'backends']
|
45
|
-
self.backends = attributes[:'backends']
|
46
|
-
end
|
47
|
-
|
48
|
-
if attributes[:'healthChecker']
|
49
|
-
self.health_checker = attributes[:'healthChecker']
|
50
|
-
end
|
51
|
-
|
52
|
-
if attributes[:'name']
|
53
|
-
self.name = attributes[:'name']
|
54
|
-
end
|
55
|
-
|
56
|
-
if attributes[:'policy']
|
57
|
-
self.policy = attributes[:'policy']
|
58
|
-
end
|
59
|
-
|
60
|
-
if attributes[:'sessionPersistenceConfiguration']
|
61
|
-
self.session_persistence_configuration = attributes[:'sessionPersistenceConfiguration']
|
62
|
-
end
|
63
|
-
|
64
|
-
if attributes[:'sslConfiguration']
|
65
|
-
self.ssl_configuration = attributes[:'sslConfiguration']
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
# Checks equality by comparing each attribute.
|
71
|
-
# @param [Object] other_object to be compared
|
72
|
-
def ==(other_object)
|
73
|
-
return true if self.equal?(other_object)
|
74
|
-
self.class == other_object.class &&
|
75
|
-
backends == other_object.backends &&
|
76
|
-
health_checker == other_object.health_checker &&
|
77
|
-
name == other_object.name &&
|
78
|
-
policy == other_object.policy &&
|
79
|
-
session_persistence_configuration == other_object.session_persistence_configuration &&
|
80
|
-
ssl_configuration == other_object.ssl_configuration
|
81
|
-
end
|
82
|
-
|
83
|
-
# @see the `==` method
|
84
|
-
# @param [Object] other_object to be compared
|
85
|
-
def eql?(other_object)
|
86
|
-
self == other_object
|
87
|
-
end
|
88
|
-
|
89
|
-
# Calculates hash code according to all attributes.
|
90
|
-
# @return [Fixnum] Hash code
|
91
|
-
def hash
|
92
|
-
[backends, health_checker, name, policy, session_persistence_configuration, ssl_configuration].hash
|
93
|
-
end
|
94
|
-
|
95
|
-
# Builds the object from hash
|
96
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
-
# @return [Object] Returns the model itself
|
98
|
-
def build_from_hash(attributes)
|
99
|
-
return nil unless attributes.is_a?(Hash)
|
100
|
-
self.class.swagger_types.each_pair do |key, type|
|
101
|
-
if type =~ /^Array<(.*)>/i
|
102
|
-
# check to ensure the input is an array given that the the attribute
|
103
|
-
# is documented as an array but the input is not
|
104
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
105
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
106
|
-
end
|
107
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
108
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
109
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
110
|
-
end
|
111
|
-
|
112
|
-
self
|
113
|
-
end
|
114
|
-
|
115
|
-
# Returns the string representation of the object
|
116
|
-
# @return [String] String presentation of the object
|
117
|
-
def to_s
|
118
|
-
to_hash.to_s
|
119
|
-
end
|
120
|
-
|
121
|
-
# Returns the object in the form of hash
|
122
|
-
# @return [Hash] Returns the object in the form of hash
|
123
|
-
def to_hash
|
124
|
-
hash = {}
|
125
|
-
self.class.attribute_map.each_pair do |attr, param|
|
126
|
-
value = self.send(attr)
|
127
|
-
next if value.nil?
|
128
|
-
hash[param] = _to_hash(value)
|
129
|
-
end
|
130
|
-
hash
|
131
|
-
end
|
132
|
-
|
133
|
-
private
|
134
|
-
|
135
|
-
# Outputs non-array value in the form of hash
|
136
|
-
# For object, use to_hash. Otherwise, just return the value
|
137
|
-
# @param [Object] value Any valid value
|
138
|
-
# @return [Hash] Returns the value in the form of hash
|
139
|
-
def _to_hash(value)
|
140
|
-
if value.is_a?(Array)
|
141
|
-
value.compact.map{ |v| _to_hash(v) }
|
142
|
-
elsif value.is_a?(Hash)
|
143
|
-
{}.tap do |hash|
|
144
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
145
|
-
end
|
146
|
-
elsif value.respond_to? :to_hash
|
147
|
-
value.to_hash
|
148
|
-
else
|
149
|
-
value
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
156
|
-
def self.attribute_map
|
157
|
-
{
|
158
|
-
:'backends' => :'backends',
|
159
|
-
:'health_checker' => :'healthChecker',
|
160
|
-
:'name' => :'name',
|
161
|
-
:'policy' => :'policy',
|
162
|
-
:'session_persistence_configuration' => :'sessionPersistenceConfiguration',
|
163
|
-
:'ssl_configuration' => :'sslConfiguration'
|
164
|
-
}
|
165
|
-
end
|
166
|
-
|
167
|
-
# Attribute type mapping.
|
168
|
-
def self.swagger_types
|
169
|
-
{
|
170
|
-
:'backends' => :'Array<OracleBMC::LoadBalancer::Models::Backend>',
|
171
|
-
:'health_checker' => :'OracleBMC::LoadBalancer::Models::HealthChecker',
|
172
|
-
:'name' => :'String',
|
173
|
-
:'policy' => :'String',
|
174
|
-
:'session_persistence_configuration' => :'OracleBMC::LoadBalancer::Models::SessionPersistenceConfigurationDetails',
|
175
|
-
:'ssl_configuration' => :'OracleBMC::LoadBalancer::Models::SSLConfiguration'
|
176
|
-
}
|
177
|
-
end
|
178
|
-
end
|
179
|
-
end
|