comet_backup_ruby_sdk 2.34.0 → 2.35.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/comet_server.rb +26 -0
- data/lib/comet/definitions.rb +17 -2
- data/lib/comet/models/backup_job_detail.rb +22 -0
- data/lib/comet/models/backup_rule_event_triggers.rb +36 -0
- data/lib/comet/models/s3generic_virtual_storage_role.rb +11 -0
- data/lib/comet/models/user_policy.rb +33 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5515ec0d67e0e3f5933187f1b9abd01390de257f15acebbac6b02f1f6b323eda
|
4
|
+
data.tar.gz: f73f2bbcbcdacbf88dbc5f22d09eec1e15305dd88cdafeedbed3cba80394da1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64170e8dc7026e1ab4f50e3fa2f435d222e2502223d690ae57357b647b3c91c0ab7f3d7324c4de198423930e8d7379709fd9ceb905663374633e48ca4b54a242
|
7
|
+
data.tar.gz: dddc00508aae6f6543337f6157b586a6086173e5fe690823462625256b332e73fc084eb74a93002ecebb927df9b526efbad91701978cc5b5eb6a28b495e7d625
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2024-08-01 v2.35.0
|
4
|
+
|
5
|
+
- Based on Comet 24.6.6
|
6
|
+
- Add new AdminConvertStorageRole API
|
7
|
+
- Update data types for new job retry feature (BackupJobDetail, BackupRuleEventTriggers, and new JOB_STATUS_RUNNING_TRYAGAIN)
|
8
|
+
- Add support for custom Prefix in S3GenericVirtualStorageRole
|
9
|
+
|
3
10
|
## 2024-07-16 v2.34.0
|
4
11
|
|
5
12
|
- Based on Comet 24.6.4
|
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.35.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -949,6 +949,32 @@ module Comet
|
|
949
949
|
ret
|
950
950
|
end
|
951
951
|
|
952
|
+
# AdminConvertStorageRole
|
953
|
+
#
|
954
|
+
# Convert IAM Storage Role vault to its underlying S3 type.
|
955
|
+
#
|
956
|
+
# You must supply administrator authentication credentials to use this API.
|
957
|
+
#
|
958
|
+
# @param [String] target_user The user to receive the new Storage Vault
|
959
|
+
# @param [String] destination_id The id of the old storage role destination to convert
|
960
|
+
# @return [Comet::RequestStorageVaultResponseMessage]
|
961
|
+
def admin_convert_storage_role(target_user, destination_id)
|
962
|
+
submit_params = {}
|
963
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
964
|
+
|
965
|
+
submit_params['TargetUser'] = target_user
|
966
|
+
raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
|
967
|
+
|
968
|
+
submit_params['DestinationId'] = destination_id
|
969
|
+
|
970
|
+
body = perform_request('api/v1/admin/convert-storage-role', submit_params)
|
971
|
+
json_body = JSON.parse body
|
972
|
+
check_status json_body
|
973
|
+
ret = Comet::RequestStorageVaultResponseMessage.new
|
974
|
+
ret.from_hash(json_body)
|
975
|
+
ret
|
976
|
+
end
|
977
|
+
|
952
978
|
# AdminCountJobsForCustomSearch
|
953
979
|
#
|
954
980
|
# Count jobs (for custom search).
|
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.6'
|
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 = 6
|
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
|
@@ -81,6 +81,14 @@ module Comet
|
|
81
81
|
# CustomRemoteBucketCustomBodyType
|
82
82
|
CUSTOMREMOTEBUCKET_CUSTOMBODY_FORM = 'form'
|
83
83
|
|
84
|
+
# The number of retry attempts a backup job can do
|
85
|
+
# This const is available in Comet 24.6.6 and later.
|
86
|
+
DEFAULT_RETRY_COUNT = 1
|
87
|
+
|
88
|
+
# The number of minutes between backup job retry attempts
|
89
|
+
# This const is available in Comet 24.6.6 and later.
|
90
|
+
DEFAULT_RETRY_TIME = 30
|
91
|
+
|
84
92
|
# LanguageCode
|
85
93
|
DEFAULT_LANGUAGE = 'en_US'
|
86
94
|
|
@@ -311,6 +319,9 @@ module Comet
|
|
311
319
|
# JobStatus: The job was thought to have been in an Abandoned state but updated the Comet Server with a running status.
|
312
320
|
JOB_STATUS_RUNNING_REVIVED = 6002
|
313
321
|
|
322
|
+
# JobStatus: The job has encountered an error and will wait to retry.
|
323
|
+
JOB_STATUS_RUNNING_TRYAGAIN = 6003
|
324
|
+
|
314
325
|
# JobStatus
|
315
326
|
JOB_STATUS_RUNNING__MAX = 6999
|
316
327
|
|
@@ -362,6 +373,10 @@ module Comet
|
|
362
373
|
# MacOSCodesignLevel: Sign, notarize, and staple
|
363
374
|
MACOSCODESIGN_LEVEL_SIGN_NOTARISE_STAPLE = 2
|
364
375
|
|
376
|
+
MIN_BUILD_NUMBER_WIN_SERVER_2016 = 14_393
|
377
|
+
|
378
|
+
MIN_BUILD_NUMBER_WIN_10 = 10_240
|
379
|
+
|
365
380
|
MIXED_VIRTUAL_ACCOUNT_TYPE_USER = 1
|
366
381
|
|
367
382
|
MIXED_VIRTUAL_ACCOUNT_TYPE_GROUP = 2
|
@@ -32,6 +32,9 @@ module Comet
|
|
32
32
|
# @type [Number] end_time
|
33
33
|
attr_accessor :end_time
|
34
34
|
|
35
|
+
# @type [Number] retry_count
|
36
|
+
attr_accessor :retry_count
|
37
|
+
|
35
38
|
# The Protected Item that this job is for
|
36
39
|
# @type [String] source_guid
|
37
40
|
attr_accessor :source_guid
|
@@ -46,6 +49,11 @@ module Comet
|
|
46
49
|
# @type [String] snapshot_id
|
47
50
|
attr_accessor :snapshot_id
|
48
51
|
|
52
|
+
# The ID of the backup rule that contains the schedule that triggered this job
|
53
|
+
# This field is available in Comet 24.6.6 and later.
|
54
|
+
# @type [String] backup_rule_guid
|
55
|
+
attr_accessor :backup_rule_guid
|
56
|
+
|
49
57
|
# @type [String] client_version
|
50
58
|
attr_accessor :client_version
|
51
59
|
|
@@ -122,10 +130,12 @@ module Comet
|
|
122
130
|
@status = 0
|
123
131
|
@start_time = 0
|
124
132
|
@end_time = 0
|
133
|
+
@retry_count = 0
|
125
134
|
@source_guid = ''
|
126
135
|
@destination_guid = ''
|
127
136
|
@device_id = ''
|
128
137
|
@snapshot_id = ''
|
138
|
+
@backup_rule_guid = ''
|
129
139
|
@client_version = ''
|
130
140
|
@total_directories = 0
|
131
141
|
@total_files = 0
|
@@ -183,6 +193,10 @@ module Comet
|
|
183
193
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
184
194
|
|
185
195
|
@end_time = v
|
196
|
+
when 'RetryCount'
|
197
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
198
|
+
|
199
|
+
@retry_count = v
|
186
200
|
when 'SourceGUID'
|
187
201
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
188
202
|
|
@@ -199,6 +213,10 @@ module Comet
|
|
199
213
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
200
214
|
|
201
215
|
@snapshot_id = v
|
216
|
+
when 'BackupRuleGUID'
|
217
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
218
|
+
|
219
|
+
@backup_rule_guid = v
|
202
220
|
when 'ClientVersion'
|
203
221
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
204
222
|
|
@@ -279,12 +297,16 @@ module Comet
|
|
279
297
|
ret['Status'] = @status
|
280
298
|
ret['StartTime'] = @start_time
|
281
299
|
ret['EndTime'] = @end_time
|
300
|
+
ret['RetryCount'] = @retry_count
|
282
301
|
ret['SourceGUID'] = @source_guid
|
283
302
|
ret['DestinationGUID'] = @destination_guid
|
284
303
|
ret['DeviceID'] = @device_id
|
285
304
|
unless @snapshot_id.nil?
|
286
305
|
ret['SnapshotID'] = @snapshot_id
|
287
306
|
end
|
307
|
+
unless @backup_rule_guid.nil?
|
308
|
+
ret['BackupRuleGUID'] = @backup_rule_guid
|
309
|
+
end
|
288
310
|
ret['ClientVersion'] = @client_version
|
289
311
|
ret['TotalDirectories'] = @total_directories
|
290
312
|
ret['TotalFiles'] = @total_files
|
@@ -21,6 +21,21 @@ module Comet
|
|
21
21
|
# @type [Boolean] on_pcboot_if_last_job_missed
|
22
22
|
attr_accessor :on_pcboot_if_last_job_missed
|
23
23
|
|
24
|
+
# The option to enable retrying when a backup job failed.
|
25
|
+
# This field is available in Comet 24.6.6 and later.
|
26
|
+
# @type [Boolean] on_last_job_fail_do_retry
|
27
|
+
attr_accessor :on_last_job_fail_do_retry
|
28
|
+
|
29
|
+
# The number of retries when the backup job fails.
|
30
|
+
# This field is available in Comet 24.6.6 and later.
|
31
|
+
# @type [Number] last_job_fail_do_retry_count
|
32
|
+
attr_accessor :last_job_fail_do_retry_count
|
33
|
+
|
34
|
+
# The number of minutes before retrying when the backup job fails.
|
35
|
+
# This field is available in Comet 24.6.6 and later.
|
36
|
+
# @type [Number] last_job_fail_do_retry_time
|
37
|
+
attr_accessor :last_job_fail_do_retry_time
|
38
|
+
|
24
39
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
25
40
|
attr_accessor :unknown_json_fields
|
26
41
|
|
@@ -29,6 +44,8 @@ module Comet
|
|
29
44
|
end
|
30
45
|
|
31
46
|
def clear
|
47
|
+
@last_job_fail_do_retry_count = 0
|
48
|
+
@last_job_fail_do_retry_time = 0
|
32
49
|
@unknown_json_fields = {}
|
33
50
|
end
|
34
51
|
|
@@ -49,6 +66,16 @@ module Comet
|
|
49
66
|
@on_pcboot = v
|
50
67
|
when 'OnPCBootIfLastJobMissed'
|
51
68
|
@on_pcboot_if_last_job_missed = v
|
69
|
+
when 'OnLastJobFailDoRetry'
|
70
|
+
@on_last_job_fail_do_retry = v
|
71
|
+
when 'LastJobFailDoRetryCount'
|
72
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
73
|
+
|
74
|
+
@last_job_fail_do_retry_count = v
|
75
|
+
when 'LastJobFailDoRetryTime'
|
76
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
77
|
+
|
78
|
+
@last_job_fail_do_retry_time = v
|
52
79
|
else
|
53
80
|
@unknown_json_fields[k] = v
|
54
81
|
end
|
@@ -64,6 +91,15 @@ module Comet
|
|
64
91
|
unless @on_pcboot_if_last_job_missed.nil?
|
65
92
|
ret['OnPCBootIfLastJobMissed'] = @on_pcboot_if_last_job_missed
|
66
93
|
end
|
94
|
+
unless @on_last_job_fail_do_retry.nil?
|
95
|
+
ret['OnLastJobFailDoRetry'] = @on_last_job_fail_do_retry
|
96
|
+
end
|
97
|
+
unless @last_job_fail_do_retry_count.nil?
|
98
|
+
ret['LastJobFailDoRetryCount'] = @last_job_fail_do_retry_count
|
99
|
+
end
|
100
|
+
unless @last_job_fail_do_retry_time.nil?
|
101
|
+
ret['LastJobFailDoRetryTime'] = @last_job_fail_do_retry_time
|
102
|
+
end
|
67
103
|
@unknown_json_fields.each do |k, v|
|
68
104
|
ret[k] = v
|
69
105
|
end
|
@@ -61,6 +61,11 @@ module Comet
|
|
61
61
|
# @type [String] region
|
62
62
|
attr_accessor :region
|
63
63
|
|
64
|
+
# Optional. Prefix to use for bucket paths.
|
65
|
+
# This field is available in Comet 24.6.3 and later.
|
66
|
+
# @type [String] prefix
|
67
|
+
attr_accessor :prefix
|
68
|
+
|
64
69
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
65
70
|
attr_accessor :unknown_json_fields
|
66
71
|
|
@@ -77,6 +82,7 @@ module Comet
|
|
77
82
|
@object_lock_mode = 0
|
78
83
|
@object_lock_days = 0
|
79
84
|
@region = ''
|
85
|
+
@prefix = ''
|
80
86
|
@unknown_json_fields = {}
|
81
87
|
end
|
82
88
|
|
@@ -129,6 +135,10 @@ module Comet
|
|
129
135
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
130
136
|
|
131
137
|
@region = v
|
138
|
+
when 'Prefix'
|
139
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
140
|
+
|
141
|
+
@prefix = v
|
132
142
|
else
|
133
143
|
@unknown_json_fields[k] = v
|
134
144
|
end
|
@@ -148,6 +158,7 @@ module Comet
|
|
148
158
|
ret['ObjectLockDays'] = @object_lock_days
|
149
159
|
ret['RemoveDeleted'] = @remove_deleted
|
150
160
|
ret['Region'] = @region
|
161
|
+
ret['Prefix'] = @prefix
|
151
162
|
@unknown_json_fields.each do |k, v|
|
152
163
|
ret[k] = v
|
153
164
|
end
|
@@ -48,6 +48,15 @@ module Comet
|
|
48
48
|
# @type [Number] mode_schedule_skip_already_running
|
49
49
|
attr_accessor :mode_schedule_skip_already_running
|
50
50
|
|
51
|
+
# @type [Number] mode_schedule_last_job_fail_do_retry
|
52
|
+
attr_accessor :mode_schedule_last_job_fail_do_retry
|
53
|
+
|
54
|
+
# @type [Number] mode_last_job_fail_do_retry_time
|
55
|
+
attr_accessor :mode_last_job_fail_do_retry_time
|
56
|
+
|
57
|
+
# @type [Number] mode_last_job_fail_do_retry_count
|
58
|
+
attr_accessor :mode_last_job_fail_do_retry_count
|
59
|
+
|
51
60
|
# @type [Number] mode_admin_reset_password
|
52
61
|
attr_accessor :mode_admin_reset_password
|
53
62
|
|
@@ -129,6 +138,9 @@ module Comet
|
|
129
138
|
@protected_item_engine_types = Comet::ProtectedItemEngineTypePolicy.new
|
130
139
|
@file_and_folder_mandatory_exclusions = []
|
131
140
|
@mode_schedule_skip_already_running = 0
|
141
|
+
@mode_schedule_last_job_fail_do_retry = 0
|
142
|
+
@mode_last_job_fail_do_retry_time = 0
|
143
|
+
@mode_last_job_fail_do_retry_count = 0
|
132
144
|
@mode_admin_reset_password = 0
|
133
145
|
@mode_admin_view_filenames = 0
|
134
146
|
@mode_require_user_reset_password = 0
|
@@ -191,6 +203,18 @@ module Comet
|
|
191
203
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
192
204
|
|
193
205
|
@mode_schedule_skip_already_running = v
|
206
|
+
when 'ModeScheduleLastJobFailDoRetry'
|
207
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
208
|
+
|
209
|
+
@mode_schedule_last_job_fail_do_retry = v
|
210
|
+
when 'ModeLastJobFailDoRetryTime'
|
211
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
212
|
+
|
213
|
+
@mode_last_job_fail_do_retry_time = v
|
214
|
+
when 'ModeLastJobFailDoRetryCount'
|
215
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
216
|
+
|
217
|
+
@mode_last_job_fail_do_retry_count = v
|
194
218
|
when 'ModeAdminResetPassword'
|
195
219
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
196
220
|
|
@@ -304,6 +328,15 @@ module Comet
|
|
304
328
|
unless @mode_schedule_skip_already_running.nil?
|
305
329
|
ret['ModeScheduleSkipAlreadyRunning'] = @mode_schedule_skip_already_running
|
306
330
|
end
|
331
|
+
unless @mode_schedule_last_job_fail_do_retry.nil?
|
332
|
+
ret['ModeScheduleLastJobFailDoRetry'] = @mode_schedule_last_job_fail_do_retry
|
333
|
+
end
|
334
|
+
unless @mode_last_job_fail_do_retry_time.nil?
|
335
|
+
ret['ModeLastJobFailDoRetryTime'] = @mode_last_job_fail_do_retry_time
|
336
|
+
end
|
337
|
+
unless @mode_last_job_fail_do_retry_count.nil?
|
338
|
+
ret['ModeLastJobFailDoRetryCount'] = @mode_last_job_fail_do_retry_count
|
339
|
+
end
|
307
340
|
unless @mode_admin_reset_password.nil?
|
308
341
|
ret['ModeAdminResetPassword'] = @mode_admin_reset_password
|
309
342
|
end
|
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.35.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-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|