comet_backup_ruby_sdk 2.33.0 → 2.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/definitions.rb +2 -2
- data/lib/comet/models/admin_user_permissions.rb +9 -0
- data/lib/comet/models/license_limits.rb +93 -0
- data/lib/comet/models/server_meta_version_info.rb +39 -0
- data/lib/comet_backup_ruby_sdk.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a5650246c6d613c814ac6c29ce1e20b08d354731c9a6552f350e86f7540c059
|
4
|
+
data.tar.gz: d05bbd26c3e6fa334ae38b799911de26e52486fac77d8fb87b99e02bbcd1f84a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6d656ff7144991407310eff6850bdfa2df887c9f0fe93ed8f52bef4c78c786c24e72d2ac5d966e69fccded36f28b85666cb7de5f08674130a70bf495a55abf
|
7
|
+
data.tar.gz: baa8c18ea3bfc5e98445e3ec1e0f0828fb5c76e53f74418f0a73b2e0c9a8ca7b05dd7234c8eb768d69ab17a937237c38d95e82a59d2c765a4087b7d729e29de2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2024-07-16 v2.34.0
|
4
|
+
|
5
|
+
- Based on Comet 24.6.4
|
6
|
+
- Added Server Device and Booster Limits
|
7
|
+
- Added API to count devices registered on a Server
|
8
|
+
- Added Software Build Role configuration per tenant
|
9
|
+
|
3
10
|
## 2024-06-11 v2.33.0
|
4
11
|
|
5
12
|
- Based on Comet 24.6.0
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
|
13
13
|
Gem::Specification.new do |spec|
|
14
14
|
spec.name = 'comet_backup_ruby_sdk'
|
15
|
-
spec.version = '2.
|
15
|
+
spec.version = '2.34.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/definitions.rb
CHANGED
@@ -7,13 +7,13 @@
|
|
7
7
|
|
8
8
|
module Comet
|
9
9
|
|
10
|
-
APPLICATION_VERSION = '24.6.
|
10
|
+
APPLICATION_VERSION = '24.6.4'
|
11
11
|
|
12
12
|
APPLICATION_VERSION_MAJOR = 24
|
13
13
|
|
14
14
|
APPLICATION_VERSION_MINOR = 6
|
15
15
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
16
|
+
APPLICATION_VERSION_REVISION = 4
|
17
17
|
|
18
18
|
# AutoRetentionLevel: The system will automatically choose how often to run an automatic Retention Pass after each backup job.
|
19
19
|
BACKUPJOBAUTORETENTION_AUTOMATIC = 0
|
@@ -75,6 +75,10 @@ module Comet
|
|
75
75
|
# @type [Array<String>] allowed_user_policies
|
76
76
|
attr_accessor :allowed_user_policies
|
77
77
|
|
78
|
+
# This field is available in Comet 24.6.1 and later.
|
79
|
+
# @type [Boolean] deny_software_build_role
|
80
|
+
attr_accessor :deny_software_build_role
|
81
|
+
|
78
82
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
79
83
|
attr_accessor :unknown_json_fields
|
80
84
|
|
@@ -155,6 +159,8 @@ module Comet
|
|
155
159
|
@allowed_user_policies[i1] = v1
|
156
160
|
end
|
157
161
|
end
|
162
|
+
when 'DenySoftwareBuildRole'
|
163
|
+
@deny_software_build_role = v
|
158
164
|
else
|
159
165
|
@unknown_json_fields[k] = v
|
160
166
|
end
|
@@ -218,6 +224,9 @@ module Comet
|
|
218
224
|
unless @allowed_user_policies.nil?
|
219
225
|
ret['AllowedUserPolicies'] = @allowed_user_policies
|
220
226
|
end
|
227
|
+
unless @deny_software_build_role.nil?
|
228
|
+
ret['DenySoftwareBuildRole'] = @deny_software_build_role
|
229
|
+
end
|
221
230
|
@unknown_json_fields.each do |k, v|
|
222
231
|
ret[k] = v
|
223
232
|
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2024 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
|
8
|
+
require 'json'
|
9
|
+
|
10
|
+
module Comet
|
11
|
+
|
12
|
+
# LicenseLimits is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class LicenseLimits
|
14
|
+
|
15
|
+
# @type [Number] device_count
|
16
|
+
attr_accessor :device_count
|
17
|
+
|
18
|
+
# @type [Hash{String => Number}] booster_count
|
19
|
+
attr_accessor :booster_count
|
20
|
+
|
21
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
22
|
+
attr_accessor :unknown_json_fields
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
clear
|
26
|
+
end
|
27
|
+
|
28
|
+
def clear
|
29
|
+
@device_count = 0
|
30
|
+
@booster_count = {}
|
31
|
+
@unknown_json_fields = {}
|
32
|
+
end
|
33
|
+
|
34
|
+
# @param [String] json_string The complete object in JSON format
|
35
|
+
def from_json(json_string)
|
36
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
37
|
+
|
38
|
+
from_hash(JSON.parse(json_string))
|
39
|
+
end
|
40
|
+
|
41
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
42
|
+
def from_hash(obj)
|
43
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
44
|
+
|
45
|
+
obj.each do |k, v|
|
46
|
+
case k
|
47
|
+
when 'deviceCount'
|
48
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
49
|
+
|
50
|
+
@device_count = v
|
51
|
+
when 'boosterCount'
|
52
|
+
@booster_count = {}
|
53
|
+
if v.nil?
|
54
|
+
@booster_count = {}
|
55
|
+
else
|
56
|
+
v.each do |k1, v1|
|
57
|
+
raise TypeError, "'v1' expected Numeric, got #{v1.class}" unless v1.is_a? Numeric
|
58
|
+
|
59
|
+
@booster_count[k1] = v1
|
60
|
+
end
|
61
|
+
end
|
62
|
+
else
|
63
|
+
@unknown_json_fields[k] = v
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# @return [Hash] The complete object as a Ruby hash
|
69
|
+
def to_hash
|
70
|
+
ret = {}
|
71
|
+
unless @device_count.nil?
|
72
|
+
ret['deviceCount'] = @device_count
|
73
|
+
end
|
74
|
+
unless @booster_count.nil?
|
75
|
+
ret['boosterCount'] = @booster_count
|
76
|
+
end
|
77
|
+
@unknown_json_fields.each do |k, v|
|
78
|
+
ret[k] = v
|
79
|
+
end
|
80
|
+
ret
|
81
|
+
end
|
82
|
+
|
83
|
+
# @return [Hash] The complete object as a Ruby hash
|
84
|
+
def to_h
|
85
|
+
to_hash
|
86
|
+
end
|
87
|
+
|
88
|
+
# @return [String] The complete object as a JSON string
|
89
|
+
def to_json(options = {})
|
90
|
+
to_hash.to_json(options)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -62,6 +62,21 @@ module Comet
|
|
62
62
|
# @type [Number] server_license_feature_set
|
63
63
|
attr_accessor :server_license_feature_set
|
64
64
|
|
65
|
+
# If non-zero, the maximum numbers of devices and Protected Item types that this server is allowed.
|
66
|
+
# This field is available in Comet 24.6.3 and later.
|
67
|
+
# @type [Comet::LicenseLimits] server_license_limit
|
68
|
+
attr_accessor :server_license_limit
|
69
|
+
|
70
|
+
# A count of the devices registered on the server that have a configured Protected Item.
|
71
|
+
# This field is available in Comet 24.6.3 and later.
|
72
|
+
# @type [Number] configured_devices
|
73
|
+
attr_accessor :configured_devices
|
74
|
+
|
75
|
+
# The current number of Protected Item types configured on the server.
|
76
|
+
# This field is available in Comet 24.6.3 and later.
|
77
|
+
# @type [Hash{String => Number}] booster_limit
|
78
|
+
attr_accessor :booster_limit
|
79
|
+
|
65
80
|
# Unix timestamp, in seconds.
|
66
81
|
# @type [Number] license_valid_until
|
67
82
|
attr_accessor :license_valid_until
|
@@ -110,6 +125,9 @@ module Comet
|
|
110
125
|
@current_time = 0
|
111
126
|
@server_license_hash = ''
|
112
127
|
@server_license_feature_set = 0
|
128
|
+
@server_license_limit = Comet::LicenseLimits.new
|
129
|
+
@configured_devices = 0
|
130
|
+
@booster_limit = {}
|
113
131
|
@license_valid_until = 0
|
114
132
|
@emails_sent_successfully = 0
|
115
133
|
@emails_sent_errors = 0
|
@@ -186,6 +204,24 @@ module Comet
|
|
186
204
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
187
205
|
|
188
206
|
@server_license_feature_set = v
|
207
|
+
when 'ServerLicenseLimit'
|
208
|
+
@server_license_limit = Comet::LicenseLimits.new
|
209
|
+
@server_license_limit.from_hash(v)
|
210
|
+
when 'ConfiguredDevices'
|
211
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
212
|
+
|
213
|
+
@configured_devices = v
|
214
|
+
when 'BoosterLimit'
|
215
|
+
@booster_limit = {}
|
216
|
+
if v.nil?
|
217
|
+
@booster_limit = {}
|
218
|
+
else
|
219
|
+
v.each do |k1, v1|
|
220
|
+
raise TypeError, "'v1' expected Numeric, got #{v1.class}" unless v1.is_a? Numeric
|
221
|
+
|
222
|
+
@booster_limit[k1] = v1
|
223
|
+
end
|
224
|
+
end
|
189
225
|
when 'LicenseValidUntil'
|
190
226
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
191
227
|
|
@@ -255,6 +291,9 @@ module Comet
|
|
255
291
|
ret['ServerLicenseHash'] = @server_license_hash
|
256
292
|
ret['ServerLicenseFeaturesAll'] = @server_license_features_all
|
257
293
|
ret['ServerLicenseFeatureSet'] = @server_license_feature_set
|
294
|
+
ret['ServerLicenseLimit'] = @server_license_limit
|
295
|
+
ret['ConfiguredDevices'] = @configured_devices
|
296
|
+
ret['BoosterLimit'] = @booster_limit
|
258
297
|
ret['LicenseValidUntil'] = @license_valid_until
|
259
298
|
ret['EmailsSentSuccessfully'] = @emails_sent_successfully
|
260
299
|
ret['EmailsSentErrors'] = @emails_sent_errors
|
@@ -93,6 +93,7 @@ require_relative 'comet/models/install_creds'
|
|
93
93
|
require_relative 'comet/models/install_token'
|
94
94
|
require_relative 'comet/models/install_token_response'
|
95
95
|
require_relative 'comet/models/job_entry'
|
96
|
+
require_relative 'comet/models/license_limits'
|
96
97
|
require_relative 'comet/models/license_options'
|
97
98
|
require_relative 'comet/models/live_user_connection'
|
98
99
|
require_relative 'comet/models/local_destination_location'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comet_backup_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Comet Licensing Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- lib/comet/models/install_token.rb
|
171
171
|
- lib/comet/models/install_token_response.rb
|
172
172
|
- lib/comet/models/job_entry.rb
|
173
|
+
- lib/comet/models/license_limits.rb
|
173
174
|
- lib/comet/models/license_options.rb
|
174
175
|
- lib/comet/models/live_user_connection.rb
|
175
176
|
- lib/comet/models/local_destination_location.rb
|