oraclebmc 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +51 -17
  4. data/lib/oraclebmc.rb +1 -1
  5. data/lib/oraclebmc/api_client.rb +1 -1
  6. data/lib/oraclebmc/config.rb +1 -1
  7. data/lib/oraclebmc/config_file_loader.rb +1 -1
  8. data/lib/oraclebmc/core/blockstorage_client.rb +1 -5
  9. data/lib/oraclebmc/core/compute_client.rb +1 -11
  10. data/lib/oraclebmc/core/core.rb +1 -1
  11. data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +1 -1
  12. data/lib/oraclebmc/core/models/attach_volume_details.rb +4 -3
  13. data/lib/oraclebmc/core/models/capture_console_history_details.rb +1 -1
  14. data/lib/oraclebmc/core/models/console_history.rb +1 -1
  15. data/lib/oraclebmc/core/models/cpe.rb +1 -1
  16. data/lib/oraclebmc/core/models/create_cpe_details.rb +1 -1
  17. data/lib/oraclebmc/core/models/create_dhcp_details.rb +1 -1
  18. data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +1 -1
  19. data/lib/oraclebmc/core/models/create_drg_details.rb +1 -1
  20. data/lib/oraclebmc/core/models/create_image_details.rb +1 -1
  21. data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +1 -1
  22. data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +1 -1
  23. data/lib/oraclebmc/core/models/create_route_table_details.rb +1 -1
  24. data/lib/oraclebmc/core/models/create_security_list_details.rb +1 -1
  25. data/lib/oraclebmc/core/models/create_subnet_details.rb +1 -1
  26. data/lib/oraclebmc/core/models/create_vcn_details.rb +1 -1
  27. data/lib/oraclebmc/core/models/create_volume_backup_details.rb +1 -1
  28. data/lib/oraclebmc/core/models/create_volume_details.rb +1 -1
  29. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +1 -1
  30. data/lib/oraclebmc/core/models/dhcp_option.rb +4 -3
  31. data/lib/oraclebmc/core/models/dhcp_options.rb +1 -1
  32. data/lib/oraclebmc/core/models/drg.rb +1 -1
  33. data/lib/oraclebmc/core/models/drg_attachment.rb +1 -1
  34. data/lib/oraclebmc/core/models/egress_security_rule.rb +1 -1
  35. data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +1 -1
  36. data/lib/oraclebmc/core/models/icmp_options.rb +1 -1
  37. data/lib/oraclebmc/core/models/image.rb +1 -1
  38. data/lib/oraclebmc/core/models/ingress_security_rule.rb +1 -1
  39. data/lib/oraclebmc/core/models/instance.rb +1 -1
  40. data/lib/oraclebmc/core/models/internet_gateway.rb +1 -1
  41. data/lib/oraclebmc/core/models/ip_sec_connection.rb +1 -1
  42. data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +1 -1
  43. data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +1 -1
  44. data/lib/oraclebmc/core/models/launch_instance_details.rb +1 -1
  45. data/lib/oraclebmc/core/models/port_range.rb +1 -1
  46. data/lib/oraclebmc/core/models/route_rule.rb +1 -1
  47. data/lib/oraclebmc/core/models/route_table.rb +1 -1
  48. data/lib/oraclebmc/core/models/security_list.rb +1 -1
  49. data/lib/oraclebmc/core/models/shape.rb +1 -1
  50. data/lib/oraclebmc/core/models/subnet.rb +1 -1
  51. data/lib/oraclebmc/core/models/tcp_options.rb +1 -1
  52. data/lib/oraclebmc/core/models/tunnel_config.rb +1 -1
  53. data/lib/oraclebmc/core/models/tunnel_status.rb +1 -1
  54. data/lib/oraclebmc/core/models/udp_options.rb +1 -1
  55. data/lib/oraclebmc/core/models/update_cpe_details.rb +1 -1
  56. data/lib/oraclebmc/core/models/update_dhcp_details.rb +1 -1
  57. data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +1 -1
  58. data/lib/oraclebmc/core/models/update_drg_details.rb +1 -1
  59. data/lib/oraclebmc/core/models/update_image_details.rb +1 -1
  60. data/lib/oraclebmc/core/models/update_instance_details.rb +1 -1
  61. data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +1 -1
  62. data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +1 -1
  63. data/lib/oraclebmc/core/models/update_route_table_details.rb +1 -1
  64. data/lib/oraclebmc/core/models/update_security_list_details.rb +1 -1
  65. data/lib/oraclebmc/core/models/update_subnet_details.rb +1 -1
  66. data/lib/oraclebmc/core/models/update_vcn_details.rb +1 -1
  67. data/lib/oraclebmc/core/models/update_volume_backup_details.rb +1 -1
  68. data/lib/oraclebmc/core/models/update_volume_details.rb +1 -1
  69. data/lib/oraclebmc/core/models/vcn.rb +1 -1
  70. data/lib/oraclebmc/core/models/vnic.rb +1 -1
  71. data/lib/oraclebmc/core/models/vnic_attachment.rb +1 -1
  72. data/lib/oraclebmc/core/models/volume.rb +1 -1
  73. data/lib/oraclebmc/core/models/volume_attachment.rb +4 -3
  74. data/lib/oraclebmc/core/models/volume_backup.rb +1 -1
  75. data/lib/oraclebmc/core/util.rb +1 -1
  76. data/lib/oraclebmc/core/virtual_network_client.rb +1 -5
  77. data/lib/oraclebmc/errors.rb +1 -1
  78. data/lib/oraclebmc/global_context.rb +1 -1
  79. data/lib/oraclebmc/identity/identity.rb +1 -1
  80. data/lib/oraclebmc/identity/identity_client.rb +1 -5
  81. data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +1 -1
  82. data/lib/oraclebmc/identity/models/api_key.rb +1 -1
  83. data/lib/oraclebmc/identity/models/availability_domain.rb +1 -1
  84. data/lib/oraclebmc/identity/models/compartment.rb +1 -1
  85. data/lib/oraclebmc/identity/models/create_api_key_details.rb +1 -1
  86. data/lib/oraclebmc/identity/models/create_compartment_details.rb +1 -1
  87. data/lib/oraclebmc/identity/models/create_group_details.rb +1 -1
  88. data/lib/oraclebmc/identity/models/create_policy_details.rb +1 -1
  89. data/lib/oraclebmc/identity/models/create_swift_password_details.rb +1 -1
  90. data/lib/oraclebmc/identity/models/create_user_details.rb +1 -1
  91. data/lib/oraclebmc/identity/models/group.rb +1 -1
  92. data/lib/oraclebmc/identity/models/policy.rb +1 -1
  93. data/lib/oraclebmc/identity/models/swift_password.rb +1 -1
  94. data/lib/oraclebmc/identity/models/ui_password.rb +1 -1
  95. data/lib/oraclebmc/identity/models/update_compartment_details.rb +1 -1
  96. data/lib/oraclebmc/identity/models/update_group_details.rb +1 -1
  97. data/lib/oraclebmc/identity/models/update_policy_details.rb +1 -1
  98. data/lib/oraclebmc/identity/models/update_state_details.rb +1 -1
  99. data/lib/oraclebmc/identity/models/update_swift_password_details.rb +1 -1
  100. data/lib/oraclebmc/identity/models/update_user_details.rb +1 -1
  101. data/lib/oraclebmc/identity/models/user.rb +1 -1
  102. data/lib/oraclebmc/identity/models/user_group_membership.rb +1 -1
  103. data/lib/oraclebmc/identity/util.rb +1 -1
  104. data/lib/oraclebmc/load_balancer/load_balancer.rb +1 -1
  105. data/lib/oraclebmc/load_balancer/load_balancer_client.rb +1 -5
  106. data/lib/oraclebmc/load_balancer/models/backend.rb +1 -1
  107. data/lib/oraclebmc/load_balancer/models/backend_details.rb +1 -1
  108. data/lib/oraclebmc/load_balancer/models/backend_set.rb +1 -1
  109. data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +1 -1
  110. data/lib/oraclebmc/load_balancer/models/certificate.rb +1 -1
  111. data/lib/oraclebmc/load_balancer/models/certificate_details.rb +1 -1
  112. data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +1 -1
  113. data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +1 -1
  114. data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +1 -1
  115. data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +1 -1
  116. data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +1 -1
  117. data/lib/oraclebmc/load_balancer/models/health_checker.rb +1 -1
  118. data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +1 -1
  119. data/lib/oraclebmc/load_balancer/models/ip_address.rb +1 -1
  120. data/lib/oraclebmc/load_balancer/models/listener.rb +1 -1
  121. data/lib/oraclebmc/load_balancer/models/listener_details.rb +1 -1
  122. data/lib/oraclebmc/load_balancer/models/load_balancer.rb +1 -1
  123. data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +1 -1
  124. data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +1 -1
  125. data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +1 -1
  126. data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +1 -1
  127. data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +1 -1
  128. data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +1 -1
  129. data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +1 -1
  130. data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +1 -1
  131. data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +1 -1
  132. data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +1 -1
  133. data/lib/oraclebmc/load_balancer/models/work_request.rb +1 -1
  134. data/lib/oraclebmc/load_balancer/models/work_request_error.rb +1 -1
  135. data/lib/oraclebmc/load_balancer/util.rb +1 -1
  136. data/lib/oraclebmc/regions.rb +1 -1
  137. data/lib/oraclebmc/response.rb +1 -1
  138. data/lib/oraclebmc/signer.rb +1 -1
  139. data/lib/oraclebmc/version.rb +2 -2
  140. data/lib/oraclebmc/waiter.rb +1 -1
  141. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eadf1d620781e08138d8a7811b9d24dc4e24578e
4
- data.tar.gz: 5b86dc50c09caab8529dd809c0ff926d046e4167
3
+ metadata.gz: 618bdb3d3d05f50343ba3ec7f8fc0088a4e76e74
4
+ data.tar.gz: bf6a43fc1c10492b661167faf7a92f06cf5e0e97
5
5
  SHA512:
6
- metadata.gz: 9716566a50728b903a25557edcdb0c28a730a281a760a6d65ef0c7be5cf1dee3d2e0e54c2c35c50afbc0fc18b0e9e7ffa2873caa9ded1003b5bdd219a757a6eb
7
- data.tar.gz: 1ec1a6c768736c6b5103782b7339b191680cddfa37c9d13198dcdda203b04349e4975ca4236a8ac5b6b87ca166b6b6009019cc2f61149221dd887d05c5350ea8
6
+ metadata.gz: c2cde2ee5b5c23b1450e59a537328a8cc0aa522e19f36a78a1134724e4cad75b9a379f6f1c0f4b89be47a4c4a76334e4037fc01eeb79a705cc861690c8c7122c
7
+ data.tar.gz: 1cf7d1c087d69c7abe12933ffe5d42c75a822da2bb68ad3b35df70b3160b297ae80ad9866080e36b6bae7a4e976a87837d4297e9a4db5edd340d5587cd1c9a8e
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016, Oracle and/or its affiliates.  All rights reserved.
1
+ Copyright (c) 2016, 2017, Oracle and/or its affiliates.  All rights reserved.
2
2
 
3
3
  This software is dual-licensed to you under the Universal Permissive License (UPL) and Apache License 2.0.  See below for license terms.  You may choose either license, or both.
4
4
   ____________________________
data/README.md CHANGED
@@ -1,13 +1,9 @@
1
1
  # Oracle Bare Metal Cloud Services Ruby SDK
2
+ **Version 1.1.2**
2
3
 
3
4
  This topic describes how to install, configure, and use the Oracle Bare Metal Cloud Services Ruby SDK.
4
5
 
5
6
  ## SDK Overview
6
- Version 1.1.1
7
-
8
- What's new in this version?
9
-
10
- * Added support for stateless security list rules. See the change log in the download for more details.
11
7
 
12
8
  The Ruby SDK supports the following services:
13
9
 
@@ -17,7 +13,9 @@ The Ruby SDK supports the following services:
17
13
 
18
14
  **Licensing:** This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License.
19
15
 
20
- The following table details some of the attributes of the SDK.
16
+
17
+ ## SDK Attributes
18
+ The following table provides details about some of the attributes of the SDK.
21
19
 
22
20
  <table>
23
21
  <tbody>
@@ -56,7 +54,8 @@ The following table details some of the attributes of the SDK.
56
54
  </tbody>
57
55
  </table>
58
56
 
59
- ## Requirements
57
+
58
+ ## SDK Requirements
60
59
 
61
60
  To use the Ruby SDK, you must have:
62
61
 
@@ -65,20 +64,29 @@ To use the Ruby SDK, you must have:
65
64
  * A keypair used for signing API requests, with the public key uploaded to Oracle. Only the user calling the API should be in possession of the private key. See the configuration information below.
66
65
  * Ruby version 2.2 or later running on Mac or Linux. Windows is not supported at this time.
67
66
 
68
- ## Downloading and Installing the Gem File
67
+ # Downloading and Installing the Gem File
68
+ ## Installing the SDK
69
+
70
+
71
+ Install from [RubyGems](https://rubygems.org/gems/oraclebmc):
69
72
 
70
- 1. Run the following command if you're running one of these operating systems:
73
+ `gem install oraclebmc`
71
74
 
72
- * For Oracle Enterprise Linux (OEL) or Red Hat Enterprise Linux (RHEL): `sudo yum upgrade curl`
73
- * For Ubuntu: `sudo apt-get install libcurl3 libcurl3-dev`
75
+ You can also [download the SDK](https://docs.us-phoenix-1.oraclecloud.com/tools/ruby/latest/download/oracle-bmcs-ruby-sdk.zip) as a zip file containing the gem file, examples, and documentation.
76
+
77
+ Install the gem with the following command:
74
78
 
75
- 2. [Download the Ruby SDK](https://docs.us-phoenix-1.oraclecloud.com/tools/ruby/latest/download/oracle-bmcs-ruby-sdk.zip). It's a zip archive that contains the gem, documentation, examples, and licensing information.
76
79
 
77
- 3. Install the gem with the following command:
80
+ `gem install oraclebmc-1.1.2.gem`
81
+
82
+
83
+ The SDK depends on `libcurl`, which may need to be installed or upgraded on some operating systems to be compatible with Oracle Bare Metal Cloud Services.
78
84
 
79
- gem install oraclebmc-1.1.1.gem
80
-
81
85
 
86
+ Use one of the following commands for your particular operating system in order to successfully make requests:
87
+
88
+ * For Oracle Linux (OL) or Red Hat Enterprise Linux (RHEL): `sudo yum upgrade curl`
89
+ * For Ubuntu: `sudo apt-get install libcurl3 libcurl3-dev`
82
90
  ### Troubleshooting an Installation
83
91
  If you see "Unable to resolve dependencies”, you can install the dependencies manually:
84
92
 
@@ -117,10 +125,14 @@ You can also load a config file from a different location, and/or specify a diff
117
125
 
118
126
  Or you can create a {OracleBMC::Config Config} programmatically. Note that the global value {OracleBMC#config OracleBMC.config} will always attempt to load the DEFAULT profile from the default config file location (`~/.oraclebmc/config`), unless it has been explicitly set to another value.
119
127
 
128
+ ## Service Errors
129
+
130
+ Any operation resulting in a service error will cause an exception of type OracleBMC::Errors::ServiceError to be thrown by the SDK. For information about common service errors returned by BMCS, see [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
131
+
120
132
  ## Examples
121
133
  The example code in this section shows how various parts of the Ruby SDK work. More examples can be found in the SDK download.
122
134
 
123
- ### Identity Operations
135
+ ### Management Operations on a User
124
136
  The following example runs create, read, update, and delete (CRUD) operations on users.
125
137
 
126
138
  require 'oraclebmc'
@@ -212,9 +224,31 @@ The following example shows how to launch an instance (which assumes that you al
212
224
  instance_id = response.data.id
213
225
  response = api.get_instance(instance_id).wait_until(:lifecycle_state, OracleBMC::Core::Models::Instance::LIFECYCLE_STATE_RUNNING)
214
226
 
227
+ ### Signing a Raw Request
228
+ The {OracleBMC::Signer} can be used to sign arbitrary requests to the Bare Metal Cloud Services. The following example uses Net::HTTP to call the IAM service directly.
229
+
230
+ require 'oraclebmc'
231
+ require 'net/http'
232
+
233
+ config = OracleBMC::ConfigFileLoader.load_config(config_file_location:my_config_file_location)
234
+ endpoint = OracleBMC::Regions.get_service_endpoint(config.region, :IdentityClient)
235
+
236
+ uri = URI(endpoint + '/20160918/users/' + config.user)
237
+ request = Net::HTTP::Get.new(uri)
238
+
239
+ signer = OracleBMC::Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase:my_private_key_pass_phrase)
240
+ signer.sign(:get, uri.to_s, request, nil)
241
+
242
+ result = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => true) {|http|
243
+ http.request(request)
244
+ }
245
+
246
+ puts result.body
247
+
215
248
  ## Questions or Feedback?
216
249
  Ways to get in touch:
217
250
 
218
251
  * [Stack Overflow](https://stackoverflow.com/): Please use the [oracle-bmcs](https://stackoverflow.com/questions/tagged/oracle-bmcs) and [oracle-bmcs-ruby-sdk](https://stackoverflow.com/questions/tagged/oracle-bmcs-ruby-sdk) tags in your post
219
252
  * [Developer Tools section](https://community.oracle.com/community/cloud_computing/bare-metal/content?filterID=contentstatus%5Bpublished%5D~category%5Bdeveloper-tools%5D&filterID=contentstatus%5Bpublished%5D~objecttype~objecttype%5Bthread%5D) of the Oracle Cloud forums
220
- * [My Oracle Support](https://support.oracle.com)
253
+ * [My Oracle Support](https://support.oracle.com)
254
+
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'oraclebmc/api_client'
4
4
  require 'oraclebmc/config'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
  require 'json'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'uri'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'inifile'
4
4
  require_relative 'config'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require "uri"
4
4
  require "logger"
@@ -46,10 +46,6 @@ module OracleBMC
46
46
 
47
47
  fail 'A region must be specified.' unless @region
48
48
 
49
- if not OracleBMC::Regions.valid_region? region
50
- logger.info "Unknown region '#{@region}', falling back to default endpoint format." if logger
51
- end
52
-
53
49
  @endpoint = OracleBMC::Regions.get_service_endpoint(@region, :BlockstorageClient) + '/20160918'
54
50
  logger.info "BlockstorageClient endpoint set to '#{endpoint}'." if logger
55
51
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require "uri"
4
4
  require "logger"
@@ -46,10 +46,6 @@ module OracleBMC
46
46
 
47
47
  fail 'A region must be specified.' unless @region
48
48
 
49
- if not OracleBMC::Regions.valid_region? region
50
- logger.info "Unknown region '#{@region}', falling back to default endpoint format." if logger
51
- end
52
-
53
49
  @endpoint = OracleBMC::Regions.get_service_endpoint(@region, :ComputeClient) + '/20160918'
54
50
  logger.info "ComputeClient endpoint set to '#{endpoint}'." if logger
55
51
  end
@@ -571,9 +567,6 @@ module OracleBMC
571
567
  # has been deleted and purged from the system, then a retry of the original creation request
572
568
  # may be rejected).
573
569
  #
574
- # @option opts [String] :opc_host_serial For Oracle internal use only.
575
- # @option opts [String] :opc_pool_name For Oracle internal use only.
576
- # @option opts [String] :opc_vnic_id For Oracle internal use only.
577
570
  # @return [Response] A Response object with data of type OracleBMC::Core::Models::Instance
578
571
  def launch_instance(launch_instance_details, opts = {})
579
572
  logger.debug "Calling operation ComputeClient#launch_instance." if logger
@@ -584,9 +577,6 @@ module OracleBMC
584
577
 
585
578
  # Query Params
586
579
  query_params = {}
587
- query_params[:'opc-host-serial'] = opts[:'opc_host_serial'] if opts[:'opc_host_serial']
588
- query_params[:'opc-pool-name'] = opts[:'opc_pool_name'] if opts[:'opc_pool_name']
589
- query_params[:'opc-vnic-id'] = opts[:'opc_vnic_id'] if opts[:'opc_vnic_id']
590
580
 
591
581
  # Header Params
592
582
  header_params = {}
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  module OracleBMC
4
4
  module Core
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
  require_relative 'attach_volume_details'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -27,9 +27,10 @@ module OracleBMC
27
27
  def self.get_subtype(object_hash)
28
28
  type = object_hash[:'type']
29
29
 
30
- return 'OracleBMC::Core::Models::AttachIScsiVolumeDetails' if not type or type == 'iscsi'
30
+ return 'OracleBMC::Core::Models::AttachIScsiVolumeDetails' if type == 'iscsi'
31
31
 
32
- fail 'Could not resolve subtype type based on the object hash.'
32
+ # TODO: Log a warning when the subtype is not found.
33
+ return 'OracleBMC::Core::Models::AttachVolumeDetails'
33
34
  end
34
35
 
35
36
  # Initializes the object
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
  require_relative 'dhcp_option'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -13,9 +13,10 @@ module OracleBMC
13
13
  def self.get_subtype(object_hash)
14
14
  type = object_hash[:'type']
15
15
 
16
- return 'OracleBMC::Core::Models::DhcpDnsOption' if not type or type == 'DomainNameServer'
16
+ return 'OracleBMC::Core::Models::DhcpDnsOption' if type == 'DomainNameServer'
17
17
 
18
- fail 'Could not resolve subtype type based on the object hash.'
18
+ # TODO: Log a warning when the subtype is not found.
19
+ return 'OracleBMC::Core::Models::DhcpOption'
19
20
  end
20
21
 
21
22
  # Initializes the object
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
  require_relative 'volume_attachment'
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  require 'date'
4
4