ibm-cloud-sdk 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68e0c97762894e63e4db55f70706d6b983b3f3260f148fbca1c9b0a5feae1ee7
4
- data.tar.gz: b1ad978d42046dfbeb0d3f5466a9c1d73de597ba3c1663d6f470f60dc842acd9
3
+ metadata.gz: d147792b6e2fd5d7ddb2b243cb2993cb606289352883831c6b805c2489c1267b
4
+ data.tar.gz: e03cbb041d6aae300f09fa4b6fb1aaaed759b187645deb2e4eeca561307f4520
5
5
  SHA512:
6
- metadata.gz: cc621c2428dcf979379ff89acf278b56083837c51d964d99677782855e02c7556eb681b413df992ccb4b7e52bf941f1a302d76657337eee3a737a4a58fcdbba7
7
- data.tar.gz: b247412ced34770e9e0efa7b9c6639aad56d69a2698f5659b0ad38367f41d452be02809ea2ed59319ed5031af0f56cf1d8b6d7703b08542c770669f1f2377a0b
6
+ metadata.gz: 920c4079d316f6d65dd4fb3b4d9bcb97d06d06b1165f43ba19b3b7c3f1e12dfe1063f2666fdaf26c2252e4fb9949363d804e4678c13f2676531993851da615d4
7
+ data.tar.gz: 125f277b64b64c751b5ae932df6d10203b7bbe01417f361667de8e36b942c574eb744e9432eebd3652ef2a21d0b5c34e05e936e3533a34c9f751d64d79bfeb0b
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+ All notable changes to the gem ibm-cloud-sdk-ruby will be documented here.
3
+
4
+ ## v0.1.3 - 2020-08-31
5
+ ### Added the following rest api calls for Power System Virtual Server service
6
+ - Add PowerIaas 'delete_volume' method
7
+ - Add PowerVS SAP API calls
8
+ - get list of available system pools within a particular data center
9
+ - get list of all storage type availble in the data center. There may be
10
+ update to the call once PowerVS service updates the storage type rest api
11
+ for Power System Virtual Server service .
12
+
@@ -11,7 +11,8 @@ Gem::Specification.new do |spec|
11
11
  spec.licenses = %w["Apache-2.0"]
12
12
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
13
 
14
- spec.metadata["homepage_uri"] = spec.homepage
14
+ spec.metadata["homepage_uri"] = spec.homepage
15
+ spec.metadata["changelog_uri"] = "https://github.com/IBM-Cloud/ibm-cloud-sdk-ruby/blob/v#{spec.version}/CHANGELOG.md"
15
16
 
16
17
  # Specify which files should be added to the gem when it is released.
17
18
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -113,6 +113,13 @@ module IBM
113
113
  get("cloud-instances/#{guid}/volumes/#{volume_id}")
114
114
  end
115
115
 
116
+ # Delete a volume
117
+ #
118
+ # @param volume_id [String] The ID of a volume
119
+ def delete_volume(volume_id)
120
+ delete("cloud-instances/#{guid}/volumes/#{volume_id}")
121
+ end
122
+
116
123
  # Get all networks in an IBM Power Cloud instance
117
124
  #
118
125
  # @return [Array<Hash>] all networks for this IBM Power Cloud instance
@@ -131,6 +138,22 @@ module IBM
131
138
  get("cloud-instances/#{guid}/networks/#{network_id}")
132
139
  end
133
140
 
141
+ # Get a available system pools list for IBM Power Cloud DC
142
+ #
143
+ # @return [Hash] SystemPool
144
+ def get_system_pool
145
+ get("cloud-instances/#{guid}/system-pools")
146
+ end
147
+
148
+ # Get a storage types list in IBM Power Cloud.
149
+ # note: this mehod to be refactored under the common
150
+ # IBM::Cloud::SDK::PowerIaas.endpoint when the rest api become available.
151
+ #
152
+ # @return [Hash] StorageType
153
+ def get_storage_types
154
+ JSON.parse(RestClient.get("https://#{region.sub(/-\d$/, '')}.power-iaas.cloud.ibm.com/broker/v1/storage-types", headers))
155
+ end
156
+
134
157
  def create_network(network_hash)
135
158
  post("cloud-instances/#{guid}/networks", network_hash.to_json)
136
159
  end
@@ -156,6 +179,37 @@ module IBM
156
179
  delete("tenants/#{tenant}/sshkeys/#{name}")
157
180
  end
158
181
 
182
+ # Get an SAP profile
183
+ #
184
+ # @param sap_profile_id [String] The ID of an SAP profile
185
+ # @return [Hash] SAP profile
186
+ def get_sap_profile(sap_profile_id)
187
+ get("cloud-instances/#{guid}/sap/#{sap_profile_id}")
188
+ end
189
+
190
+ # Get list of all SAP profiles
191
+ #
192
+ # @return [Array<Hash>] all SAP profiles available to this instance
193
+ def get_sap_profiles
194
+ sap_profiles = get("cloud-instances/#{guid}/sap")["profiles"] || []
195
+
196
+ sap_profiles.map do |sap_profile|
197
+ get_sap_profile(sap_profile["profileID"])
198
+ end
199
+ end
200
+
201
+ # Create a new SAP PVM Instance
202
+ #
203
+ # Create a new PVM instance using an SAP profile. The resultant PVM
204
+ # instance is the standard 'PVMInstance' type and can be accessed via
205
+ # the existing *_pvm_instance methods.
206
+ #
207
+ # @param sap_profile_id [String] The ID of an SAP profile
208
+ # @return [Hash] SAP profile
209
+ def create_sap_pvm_instance(instance_hash)
210
+ post("cloud-instances/#{guid}/sap", instance_hash.to_json)
211
+ end
212
+
159
213
  private
160
214
 
161
215
  attr_reader :crn, :guid, :region, :tenant, :token
@@ -1,7 +1,7 @@
1
1
  module IBM
2
2
  module Cloud
3
3
  module SDK
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm-cloud-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - IBM Cloud Developers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -33,6 +33,7 @@ files:
33
33
  - ".gitignore"
34
34
  - ".rspec"
35
35
  - ".travis.yml"
36
+ - CHANGELOG.md
36
37
  - Gemfile
37
38
  - LICENSE.txt
38
39
  - README.md
@@ -54,6 +55,7 @@ licenses:
54
55
  - '"Apache-2.0"'
55
56
  metadata:
56
57
  homepage_uri: https://github.com/IBM-Cloud/ibm-cloud-sdk-ruby
58
+ changelog_uri: https://github.com/IBM-Cloud/ibm-cloud-sdk-ruby/blob/v0.1.3/CHANGELOG.md
57
59
  post_install_message:
58
60
  rdoc_options: []
59
61
  require_paths: