ibm_cloud_power 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -12
- data/ibm_cloud_power-2.1.0.gem +0 -0
- data/lib/ibm_cloud_power/api/p_cloud_events_api.rb +9 -4
- data/lib/ibm_cloud_power/version.rb +1 -1
- data/test.rb +32 -0
- metadata +5 -4
- data/pkg/ibm_cloud_power-2.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aeb1383c9b55fa9ec6d314ca1012b2142da4ec36dde1cc79903a615fb39cd3e
|
4
|
+
data.tar.gz: 9f3fd20f955a24438a94aab816faaac3eff9465292f3c5f0888378e09002e2b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b829c91259320b6901d57510ede5dc0a30e60b19362ae0457b231d751b1b48ea627de1441b299655c92c4138e76149b531ee76b2512133f1c4bcfd371667acd5
|
7
|
+
data.tar.gz: dc5910704d0396d8b79f3c74e95e3dc5fbdb911b30878039f8d9f34ebf4dfb926ae4a36f772197aa66a3b1144ead048f48be90f3dab8fc9b4cf3ae44f98e6ac3
|
data/Gemfile.lock
CHANGED
@@ -14,34 +14,36 @@ GEM
|
|
14
14
|
ethon (0.16.0)
|
15
15
|
ffi (>= 1.15.0)
|
16
16
|
ffi (1.15.5)
|
17
|
-
jaro_winkler (1.5.
|
17
|
+
jaro_winkler (1.5.6)
|
18
18
|
method_source (1.0.0)
|
19
|
-
parallel (1.
|
20
|
-
parser (3.
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.3)
|
21
21
|
ast (~> 2.4.1)
|
22
|
-
|
22
|
+
racc
|
23
|
+
pry (0.14.2)
|
23
24
|
coderay (~> 1.1)
|
24
25
|
method_source (~> 1.0)
|
25
26
|
pry-byebug (3.10.1)
|
26
27
|
byebug (~> 11.0)
|
27
28
|
pry (>= 0.13, < 0.15)
|
28
|
-
psych (
|
29
|
+
psych (5.1.0)
|
29
30
|
stringio
|
31
|
+
racc (1.7.1)
|
30
32
|
rainbow (3.1.1)
|
31
33
|
rake (13.0.6)
|
32
34
|
rspec (3.12.0)
|
33
35
|
rspec-core (~> 3.12.0)
|
34
36
|
rspec-expectations (~> 3.12.0)
|
35
37
|
rspec-mocks (~> 3.12.0)
|
36
|
-
rspec-core (3.12.
|
38
|
+
rspec-core (3.12.2)
|
37
39
|
rspec-support (~> 3.12.0)
|
38
|
-
rspec-expectations (3.12.
|
40
|
+
rspec-expectations (3.12.3)
|
39
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
40
42
|
rspec-support (~> 3.12.0)
|
41
|
-
rspec-mocks (3.12.
|
43
|
+
rspec-mocks (3.12.6)
|
42
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
43
45
|
rspec-support (~> 3.12.0)
|
44
|
-
rspec-support (3.12.
|
46
|
+
rspec-support (3.12.1)
|
45
47
|
rubocop (0.66.0)
|
46
48
|
jaro_winkler (~> 1.5.1)
|
47
49
|
parallel (~> 1.10)
|
@@ -50,8 +52,8 @@ GEM
|
|
50
52
|
rainbow (>= 2.2.2, < 4.0)
|
51
53
|
ruby-progressbar (~> 1.7)
|
52
54
|
unicode-display_width (>= 1.4.0, < 1.6)
|
53
|
-
ruby-progressbar (1.
|
54
|
-
stringio (3.0.
|
55
|
+
ruby-progressbar (1.13.0)
|
56
|
+
stringio (3.0.8)
|
55
57
|
typhoeus (1.4.0)
|
56
58
|
ethon (>= 0.9.0)
|
57
59
|
unicode-display_width (1.5.0)
|
@@ -67,4 +69,4 @@ DEPENDENCIES
|
|
67
69
|
rubocop (~> 0.66.0)
|
68
70
|
|
69
71
|
BUNDLED WITH
|
70
|
-
2.3.
|
72
|
+
2.3.3
|
Binary file
|
@@ -91,13 +91,18 @@ module IbmCloudPower
|
|
91
91
|
|
92
92
|
# Get events from this cloud instance since a specific timestamp
|
93
93
|
# @param cloud_instance_id [String] Cloud Instance ID of a PCloud Instance
|
94
|
+
# @param from_time [String, Hash] A starting timestamp in either ISO 8601 or unix epoch format, or a Hash of optional parameters
|
95
|
+
# Note: 'from_time' as a string is deprecated and will be removed in the next major release.
|
94
96
|
# @param [Hash] opts the optional parameters
|
95
|
-
# @option opts [String] :
|
96
|
-
# @option opts [String] :from_time A from query time in either ISO 8601 or unix epoch format
|
97
|
-
# @option opts [String] :to_time A to query time in either ISO 8601 or unix epoch format
|
97
|
+
# @option opts [String] :to_time An ending timestamp in either ISO 8601 or Unix epoch format
|
98
98
|
# @option opts [String] :accept_language The language requested for the return document
|
99
99
|
# @return [Events]
|
100
|
-
def pcloud_events_getsince(cloud_instance_id, opts = {})
|
100
|
+
def pcloud_events_getsince(cloud_instance_id, from_time = nil, opts = {})
|
101
|
+
if from_time.is_a?(Hash)
|
102
|
+
opts.merge!(from_time)
|
103
|
+
else
|
104
|
+
opts[:from_time] = from_time
|
105
|
+
end
|
101
106
|
data, _status_code, _headers = pcloud_events_getsince_with_http_info(cloud_instance_id, opts)
|
102
107
|
data
|
103
108
|
end
|
data/test.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
api_key = ENV["IBMCLOUD_API_KEY"]
|
4
|
+
guid = "b7f1637d-96fe-46f0-9895-ce305d6e3865"
|
5
|
+
crn = "crn:v1:bluemix:public:power-iaas:mon01:a/1fdf5effc3f945688c021cd0a8b45c4d:b7f1637d-96fe-46f0-9895-ce305d6e3865::"
|
6
|
+
api_endpoint_hostname = "mon.power-iaas.cloud.ibm.com"
|
7
|
+
|
8
|
+
|
9
|
+
require "ibm_cloud_iam"
|
10
|
+
iam_token_api = IbmCloudIam::TokenOperationsApi.new
|
11
|
+
token = iam_token_api.get_token_api_key("urn:ibm:params:oauth:grant-type:apikey", api_key)
|
12
|
+
|
13
|
+
require "ibm_cloud_power"
|
14
|
+
power_api_client = IbmCloudPower::ApiClient.new
|
15
|
+
|
16
|
+
power_api_client.config.api_key = api_key
|
17
|
+
power_api_client.config.scheme = "https"
|
18
|
+
power_api_client.config.host = api_endpoint_hostname
|
19
|
+
power_api_client.default_headers["Crn"] = crn
|
20
|
+
power_api_client.default_headers["Authorization"] = "#{token.token_type} #{token.access_token}"
|
21
|
+
|
22
|
+
pcloud_events_api = IbmCloudPower::PCloudEventsApi.new(power_api_client)
|
23
|
+
|
24
|
+
from_time = 0
|
25
|
+
|
26
|
+
puts("Old Interface")
|
27
|
+
puts(pcloud_events_api.pcloud_events_getsince(guid, 0).events[0])
|
28
|
+
|
29
|
+
puts("New Interface")
|
30
|
+
puts(pcloud_events_api.pcloud_events_getsince(guid, {:from_time=>0}).events[0])
|
31
|
+
|
32
|
+
puts(pcloud_events_api.pcloud_events_getsince(guid, nil))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ibm_cloud_power
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IBM Cloud Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -284,6 +284,7 @@ files:
|
|
284
284
|
- docs/VolumesCloneResponse.md
|
285
285
|
- docs/VolumesClones.md
|
286
286
|
- git_push.sh
|
287
|
+
- ibm_cloud_power-2.1.0.gem
|
287
288
|
- ibm_cloud_power.gemspec
|
288
289
|
- lib/ibm_cloud_power.rb
|
289
290
|
- lib/ibm_cloud_power/api/p_cloud_cloud_connections_api.rb
|
@@ -511,7 +512,6 @@ files:
|
|
511
512
|
- lib/ibm_cloud_power/models/vpn_connection_update.rb
|
512
513
|
- lib/ibm_cloud_power/models/vpn_connections.rb
|
513
514
|
- lib/ibm_cloud_power/version.rb
|
514
|
-
- pkg/ibm_cloud_power-2.1.0.gem
|
515
515
|
- spec/api/p_cloud_cloud_connections_api_spec.rb
|
516
516
|
- spec/api/p_cloud_disaster_recovery_api_spec.rb
|
517
517
|
- spec/api/p_cloud_events_api_spec.rb
|
@@ -736,6 +736,7 @@ files:
|
|
736
736
|
- spec/models/vpn_connection_update_spec.rb
|
737
737
|
- spec/models/vpn_connections_spec.rb
|
738
738
|
- spec/spec_helper.rb
|
739
|
+
- test.rb
|
739
740
|
homepage: https://openapi-generator.tech
|
740
741
|
licenses:
|
741
742
|
- Apache-2.0
|
@@ -755,7 +756,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
755
756
|
- !ruby/object:Gem::Version
|
756
757
|
version: '0'
|
757
758
|
requirements: []
|
758
|
-
rubygems_version: 3.
|
759
|
+
rubygems_version: 3.2.33
|
759
760
|
signing_key:
|
760
761
|
specification_version: 4
|
761
762
|
summary: IBM Cloud Power Cloud
|
Binary file
|