comet_backup_ruby_sdk 2.11.0 → 2.13.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/.gitignore +0 -0
- data/.rubocop.yml +0 -0
- data/CHANGELOG.md +10 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +1 -1
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +0 -1
- data/lib/comet/definitions.rb +16 -14
- data/lib/comet/models/destination_config.rb +9 -0
- data/lib/comet/models/destination_location.rb +9 -0
- data/lib/comet/models/web_dav_destination_location.rb +113 -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: dd580d387bff734854661ad2a96745a0687538a2fc1597ca3fa193a37451bc1c
|
4
|
+
data.tar.gz: d64c702fbd3f7aabd58a4653f6753374b1e54faad802eb184b5e9804bc59c54d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1a4cb81494020fb4fba9c5c0d524ec22f01afe605eb87568a0f6d4b91b9c7327e79ac8b8970cde56c70f6ee2bb343e3c7cfea325b88ec92db5c3c6c6fa94817
|
7
|
+
data.tar.gz: d76d0ce3aa82f4d986271ef1568271937edb3e397bd289e7e206c559dd8007a62eff01d073e91aad83d8d357c3bd63e4b56d037e21bea72c745cf7e8ce097789
|
data/.gitignore
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2023-08-29 v2.13.0
|
4
|
+
|
5
|
+
- Based on Comet 23.8.0
|
6
|
+
- Improve documentation of JobStatus constants
|
7
|
+
|
8
|
+
## 2023-08-09 v2.12.0
|
9
|
+
|
10
|
+
- Based on Comet 23.6.9
|
11
|
+
- Added WebDAV `DestinationLocation`
|
12
|
+
|
3
13
|
## 2023-08-02 v2.11.0
|
4
14
|
|
5
15
|
- Based on Comet 23.6.9
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
@@ -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.13.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -4100,7 +4100,6 @@ module Comet
|
|
4100
4100
|
#
|
4101
4101
|
# You must supply administrator authentication credentials to use this API.
|
4102
4102
|
# Access to this API may be prevented on a per-administrator basis.
|
4103
|
-
# This API requires the Storage Role to be enabled.
|
4104
4103
|
# This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
|
4105
4104
|
#
|
4106
4105
|
# @param [Comet::DestinationLocation] extra_data The destination location settings
|
data/lib/comet/definitions.rb
CHANGED
@@ -7,13 +7,13 @@
|
|
7
7
|
|
8
8
|
module Comet
|
9
9
|
|
10
|
-
APPLICATION_VERSION = '23.
|
10
|
+
APPLICATION_VERSION = '23.8.0'
|
11
11
|
|
12
12
|
APPLICATION_VERSION_MAJOR = 23
|
13
13
|
|
14
|
-
APPLICATION_VERSION_MINOR =
|
14
|
+
APPLICATION_VERSION_MINOR = 8
|
15
15
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
16
|
+
APPLICATION_VERSION_REVISION = 0
|
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
|
@@ -115,6 +115,8 @@ module Comet
|
|
115
115
|
# Storj
|
116
116
|
DESTINATIONTYPE_STORJ = 1009
|
117
117
|
|
118
|
+
DESTINATIONTYPE_WEBDAV = 1010
|
119
|
+
|
118
120
|
# When defining a schedule via policy, use this option to dynamically select the Storage Vault that was created most recently.
|
119
121
|
DESTINATIONTYPE_LATEST = 1100
|
120
122
|
|
@@ -262,7 +264,7 @@ module Comet
|
|
262
264
|
# JobStatus: If the BackupJobDetail.Status field is a 5xxx code, the job has stopped for a successful reason.
|
263
265
|
JOB_STATUS_STOP_SUCCESS__MIN = 5000
|
264
266
|
|
265
|
-
# JobStatus
|
267
|
+
# JobStatus: The job is complete and was successful.
|
266
268
|
JOB_STATUS_STOP_SUCCESS = 5000
|
267
269
|
|
268
270
|
# JobStatus
|
@@ -274,10 +276,10 @@ module Comet
|
|
274
276
|
# JobStatus: Unused
|
275
277
|
JOB_STATUS_RUNNING_INDETERMINATE = 6000
|
276
278
|
|
277
|
-
# JobStatus
|
279
|
+
# JobStatus: The last information the server received from the device is that the job is currently running.
|
278
280
|
JOB_STATUS_RUNNING_ACTIVE = 6001
|
279
281
|
|
280
|
-
# JobStatus:
|
282
|
+
# JobStatus: The job was thought to have been in an Abandoned state but updated the Comet Server with a running status.
|
281
283
|
JOB_STATUS_RUNNING_REVIVED = 6002
|
282
284
|
|
283
285
|
# JobStatus
|
@@ -289,25 +291,25 @@ module Comet
|
|
289
291
|
# JobStatus
|
290
292
|
JOB_STATUS_FAILED_TIMEOUT = 7000
|
291
293
|
|
292
|
-
# JobStatus
|
294
|
+
# JobStatus: The job is complete but there was a problem that may have resulted in issues with the expected result.
|
293
295
|
JOB_STATUS_FAILED_WARNING = 7001
|
294
296
|
|
295
|
-
# JobStatus
|
297
|
+
# JobStatus: There was an error during the job and it did not fully complete.
|
296
298
|
JOB_STATUS_FAILED_ERROR = 7002
|
297
299
|
|
298
|
-
# JobStatus
|
300
|
+
# JobStatus: During a backup job either the "All protected items" quota or "Storage Vault" quota was exceeded.
|
299
301
|
JOB_STATUS_FAILED_QUOTA = 7003
|
300
302
|
|
301
|
-
# JobStatus
|
303
|
+
# JobStatus: The job did not start at its scheduled time.
|
302
304
|
JOB_STATUS_FAILED_SCHEDULEMISSED = 7004
|
303
305
|
|
304
|
-
# JobStatus
|
306
|
+
# JobStatus: The job was cancelled manually, a device shutdown was detected, or the backup time limit was reached.
|
305
307
|
JOB_STATUS_FAILED_CANCELLED = 7005
|
306
308
|
|
307
|
-
# JobStatus
|
309
|
+
# JobStatus: The backup job was skipped as there was already a backup running and the "Skip if already running" option was enabled.
|
308
310
|
JOB_STATUS_FAILED_SKIPALREADYRUNNING = 7006
|
309
311
|
|
310
|
-
# JobStatus
|
312
|
+
# JobStatus: The job has stopped unexpectedly or has been manually marked as abandoned by an admin.
|
311
313
|
JOB_STATUS_FAILED_ABANDONED = 7007
|
312
314
|
|
313
315
|
# JobStatus
|
@@ -405,7 +407,7 @@ module Comet
|
|
405
407
|
# PSAType
|
406
408
|
PSA_TYPE_GRADIENT = 1
|
407
409
|
|
408
|
-
RELEASE_CODENAME = '
|
410
|
+
RELEASE_CODENAME = 'Adrastea'
|
409
411
|
|
410
412
|
# RemoteServerType
|
411
413
|
REMOTESERVER_COMET = 'comet'
|
@@ -183,6 +183,10 @@ module Comet
|
|
183
183
|
# @type [Comet::B2DestinationLocation] b2
|
184
184
|
attr_accessor :b2
|
185
185
|
|
186
|
+
# This field is available in Comet 23.6.9 and later.
|
187
|
+
# @type [Comet::WebDavDestinationLocation] web_dav
|
188
|
+
attr_accessor :web_dav
|
189
|
+
|
186
190
|
# @type [Comet::StorjDestinationLocation] storj
|
187
191
|
attr_accessor :storj
|
188
192
|
|
@@ -286,6 +290,7 @@ module Comet
|
|
286
290
|
@localcopy_win_smbpassword_format = 0
|
287
291
|
@swift = Comet::SwiftDestinationLocation.new
|
288
292
|
@b2 = Comet::B2DestinationLocation.new
|
293
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
289
294
|
@storj = Comet::StorjDestinationLocation.new
|
290
295
|
@span_targets = []
|
291
296
|
@encryption_key_encryption_method = 0
|
@@ -509,6 +514,9 @@ module Comet
|
|
509
514
|
when 'B2'
|
510
515
|
@b2 = Comet::B2DestinationLocation.new
|
511
516
|
@b2.from_hash(v)
|
517
|
+
when 'WebDav'
|
518
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
519
|
+
@web_dav.from_hash(v)
|
512
520
|
when 'Storj'
|
513
521
|
@storj = Comet::StorjDestinationLocation.new
|
514
522
|
@storj.from_hash(v)
|
@@ -607,6 +615,7 @@ module Comet
|
|
607
615
|
ret['LocalcopyWinSMBPasswordFormat'] = @localcopy_win_smbpassword_format
|
608
616
|
ret['Swift'] = @swift
|
609
617
|
ret['B2'] = @b2
|
618
|
+
ret['WebDav'] = @web_dav
|
610
619
|
ret['Storj'] = @storj
|
611
620
|
ret['SpanTargets'] = @span_targets
|
612
621
|
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
@@ -163,6 +163,10 @@ module Comet
|
|
163
163
|
# @type [Comet::B2DestinationLocation] b2
|
164
164
|
attr_accessor :b2
|
165
165
|
|
166
|
+
# This field is available in Comet 23.6.9 and later.
|
167
|
+
# @type [Comet::WebDavDestinationLocation] web_dav
|
168
|
+
attr_accessor :web_dav
|
169
|
+
|
166
170
|
# @type [Comet::StorjDestinationLocation] storj
|
167
171
|
attr_accessor :storj
|
168
172
|
|
@@ -227,6 +231,7 @@ module Comet
|
|
227
231
|
@localcopy_win_smbpassword_format = 0
|
228
232
|
@swift = Comet::SwiftDestinationLocation.new
|
229
233
|
@b2 = Comet::B2DestinationLocation.new
|
234
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
230
235
|
@storj = Comet::StorjDestinationLocation.new
|
231
236
|
@span_targets = []
|
232
237
|
@unknown_json_fields = {}
|
@@ -399,6 +404,9 @@ module Comet
|
|
399
404
|
when 'B2'
|
400
405
|
@b2 = Comet::B2DestinationLocation.new
|
401
406
|
@b2.from_hash(v)
|
407
|
+
when 'WebDav'
|
408
|
+
@web_dav = Comet::WebDavDestinationLocation.new
|
409
|
+
@web_dav.from_hash(v)
|
402
410
|
when 'Storj'
|
403
411
|
@storj = Comet::StorjDestinationLocation.new
|
404
412
|
@storj.from_hash(v)
|
@@ -465,6 +473,7 @@ module Comet
|
|
465
473
|
ret['LocalcopyWinSMBPasswordFormat'] = @localcopy_win_smbpassword_format
|
466
474
|
ret['Swift'] = @swift
|
467
475
|
ret['B2'] = @b2
|
476
|
+
ret['WebDav'] = @web_dav
|
468
477
|
ret['Storj'] = @storj
|
469
478
|
ret['SpanTargets'] = @span_targets
|
470
479
|
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2023 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
|
+
# WebDavDestinationLocation is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# This type is available in Comet 23.6.9 and later.
|
14
|
+
class WebDavDestinationLocation
|
15
|
+
|
16
|
+
# The URL of the WebDAV server, including http/https and any custom port
|
17
|
+
# @type [String] dav_server
|
18
|
+
attr_accessor :dav_server
|
19
|
+
|
20
|
+
# The username for logging in to the WebDAV server
|
21
|
+
# @type [String] user_name
|
22
|
+
attr_accessor :user_name
|
23
|
+
|
24
|
+
# The password for logging in to the WebDAV server
|
25
|
+
# @type [String] access_key
|
26
|
+
attr_accessor :access_key
|
27
|
+
|
28
|
+
# The target directory path within the WebDAV server
|
29
|
+
# @type [String] path
|
30
|
+
attr_accessor :path
|
31
|
+
|
32
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
|
+
attr_accessor :unknown_json_fields
|
34
|
+
|
35
|
+
def initialize
|
36
|
+
clear
|
37
|
+
end
|
38
|
+
|
39
|
+
def clear
|
40
|
+
@dav_server = ''
|
41
|
+
@user_name = ''
|
42
|
+
@access_key = ''
|
43
|
+
@path = ''
|
44
|
+
@unknown_json_fields = {}
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [String] json_string The complete object in JSON format
|
48
|
+
def from_json(json_string)
|
49
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
50
|
+
|
51
|
+
from_hash(JSON.parse(json_string))
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
55
|
+
def from_hash(obj)
|
56
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
57
|
+
|
58
|
+
obj.each do |k, v|
|
59
|
+
case k
|
60
|
+
when 'DavServer'
|
61
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
62
|
+
|
63
|
+
@dav_server = v
|
64
|
+
when 'UserName'
|
65
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
66
|
+
|
67
|
+
@user_name = v
|
68
|
+
when 'AccessKey'
|
69
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
70
|
+
|
71
|
+
@access_key = v
|
72
|
+
when 'Path'
|
73
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
74
|
+
|
75
|
+
@path = v
|
76
|
+
else
|
77
|
+
@unknown_json_fields[k] = v
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# @return [Hash] The complete object as a Ruby hash
|
83
|
+
def to_hash
|
84
|
+
ret = {}
|
85
|
+
unless @dav_server.nil?
|
86
|
+
ret['DavServer'] = @dav_server
|
87
|
+
end
|
88
|
+
unless @user_name.nil?
|
89
|
+
ret['UserName'] = @user_name
|
90
|
+
end
|
91
|
+
unless @access_key.nil?
|
92
|
+
ret['AccessKey'] = @access_key
|
93
|
+
end
|
94
|
+
unless @path.nil?
|
95
|
+
ret['Path'] = @path
|
96
|
+
end
|
97
|
+
@unknown_json_fields.each do |k, v|
|
98
|
+
ret[k] = v
|
99
|
+
end
|
100
|
+
ret
|
101
|
+
end
|
102
|
+
|
103
|
+
# @return [Hash] The complete object as a Ruby hash
|
104
|
+
def to_h
|
105
|
+
to_hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# @return [String] The complete object as a JSON string
|
109
|
+
def to_json(options = {})
|
110
|
+
to_hash.to_json(options)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -205,6 +205,7 @@ require_relative 'comet/models/web_authn_relying_party_entity'
|
|
205
205
|
require_relative 'comet/models/web_authn_sign_request'
|
206
206
|
require_relative 'comet/models/web_authn_sign_response'
|
207
207
|
require_relative 'comet/models/web_authn_user_entity'
|
208
|
+
require_relative 'comet/models/web_dav_destination_location'
|
208
209
|
require_relative 'comet/models/web_interface_branding_properties'
|
209
210
|
require_relative 'comet/models/webhook_option'
|
210
211
|
require_relative 'comet/models/win_smbauth'
|
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.13.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: 2023-08-
|
11
|
+
date: 2023-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -283,6 +283,7 @@ files:
|
|
283
283
|
- lib/comet/models/web_authn_sign_request.rb
|
284
284
|
- lib/comet/models/web_authn_sign_response.rb
|
285
285
|
- lib/comet/models/web_authn_user_entity.rb
|
286
|
+
- lib/comet/models/web_dav_destination_location.rb
|
286
287
|
- lib/comet/models/web_interface_branding_properties.rb
|
287
288
|
- lib/comet/models/webhook_option.rb
|
288
289
|
- lib/comet/models/win_smbauth.rb
|