comet_backup_ruby_sdk 2.25.0 → 2.27.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 +8 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +50 -1
- data/lib/comet/definitions.rb +36 -15
- data/lib/comet/models/admin_user_permissions.rb +9 -0
- data/lib/comet/models/amazon_awsvirtual_storage_role_settings.rb +14 -0
- data/lib/comet/models/custom_remote_bucket_settings.rb +17 -0
- data/lib/comet/models/destination_config.rb +18 -0
- data/lib/comet/models/destination_location.rb +8 -0
- data/lib/comet/models/external_authentication_source.rb +31 -1
- data/lib/comet/models/impossible_cloud_iamtemplate_settings.rb +131 -0
- data/lib/comet/models/impossible_cloud_partner_template_settings.rb +85 -0
- data/lib/comet/models/object_lock_storage_template_settings.rb +101 -0
- data/lib/comet/models/remote_server_address.rb +31 -1
- data/lib/comet/models/remote_storage_option.rb +31 -1
- data/lib/comet/models/replica_server.rb +31 -1
- data/lib/comet/models/restore_job_advanced_options.rb +7 -0
- data/lib/comet/models/s3generic_virtual_storage_role.rb +28 -0
- data/lib/comet/models/smbdestination_location.rb +109 -0
- data/lib/comet/models/source_config.rb +2 -0
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +15 -0
- data/lib/comet_backup_ruby_sdk.rb +4 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afe39a5f978ad5e04e3f384e4f423a6d2bfafb6fd65916b5b4cfb8fa187bc018
|
4
|
+
data.tar.gz: 919e702d99a5544dc2fa292a7e7f0a3745a45339f606bee696d3242a362c31e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 571c2e0c125cd7cc63287966ed28bc7e2ca8fda6a4d901adf67bf5885a1cc2f9e08e3113bdd5c5d4749bd5c65ff022c9e912e45c3db05e3a1f007dd4b4ce54eb
|
7
|
+
data.tar.gz: 2d8a69b6dfe159a4eb1c04510453bbed3a54490dd4df221b0dc89a53bb2b9aab912d55effeac8afc6685148f3ccb18b90df6b5bc03e7dff8125f9c36259058c7
|
data/CHANGELOG.md
CHANGED
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.27.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -539,6 +539,29 @@ module Comet
|
|
539
539
|
perform_request('api/v1/admin/branding/generate-client/by-platform', submit_params)
|
540
540
|
end
|
541
541
|
|
542
|
+
# AdminBrandingGenerateClientLinuxDeb
|
543
|
+
#
|
544
|
+
# Download software (Linux Debian Package).
|
545
|
+
#
|
546
|
+
# This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads.
|
547
|
+
# This API requires the Software Build Role to be enabled.
|
548
|
+
# This API requires the Auth Role to be enabled.
|
549
|
+
#
|
550
|
+
# @param [String] self_address (Optional) The external URL of this server, used to resolve conflicts
|
551
|
+
# @return [String]
|
552
|
+
def admin_branding_generate_client_linux_deb(self_address = nil)
|
553
|
+
submit_params = {}
|
554
|
+
if self_address.nil?
|
555
|
+
submit_params['SelfAddress'] = @server_address
|
556
|
+
else
|
557
|
+
raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
|
558
|
+
|
559
|
+
submit_params['SelfAddress'] = self_address
|
560
|
+
end
|
561
|
+
|
562
|
+
perform_request('api/v1/admin/branding/generate-client/linux-deb', submit_params)
|
563
|
+
end
|
564
|
+
|
542
565
|
# AdminBrandingGenerateClientLinuxgeneric
|
543
566
|
#
|
544
567
|
# Download software (Linux Server .run).
|
@@ -3122,6 +3145,26 @@ module Comet
|
|
3122
3145
|
perform_request('api/v1/admin/meta/read-logs', submit_params)
|
3123
3146
|
end
|
3124
3147
|
|
3148
|
+
# AdminMetaReadSelectLogs
|
3149
|
+
#
|
3150
|
+
# Get logs file content.
|
3151
|
+
# On non-Windows platforms, log content uses LF line endings. On Windows, Comet changed from LF to CRLF line endings in 18.3.2.
|
3152
|
+
# This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
|
3153
|
+
#
|
3154
|
+
# You must supply administrator authentication credentials to use this API.
|
3155
|
+
# This API is only available for top-level administrator accounts, not for Tenant administrator accounts.
|
3156
|
+
#
|
3157
|
+
# @param [Array<Number>] logs An array of log days, selected from the options returned by the Get Log Files API
|
3158
|
+
# @return [String]
|
3159
|
+
def admin_meta_read_select_logs(logs)
|
3160
|
+
submit_params = {}
|
3161
|
+
raise TypeError, "'logs' expected Array, got #{logs.class}" unless logs.is_a? Array
|
3162
|
+
|
3163
|
+
submit_params['Logs'] = logs.to_json
|
3164
|
+
|
3165
|
+
perform_request('api/v1/admin/meta/read-select-logs', submit_params)
|
3166
|
+
end
|
3167
|
+
|
3125
3168
|
# AdminMetaRemoteStorageVaultGet
|
3126
3169
|
#
|
3127
3170
|
# Get Requesting Remote Storage Vault Config.
|
@@ -3293,12 +3336,18 @@ module Comet
|
|
3293
3336
|
# Access to this API may be prevented on a per-administrator basis.
|
3294
3337
|
#
|
3295
3338
|
# @param [Comet::EmailReportingOption] email_reporting_option Test email reporting option for sending
|
3339
|
+
# @param [String] target_organization (Optional) If present, Testing email with a target organization. Only allowed for top-level admins. (>= 24.3.0)
|
3296
3340
|
# @return [Comet::CometAPIResponseMessage]
|
3297
|
-
def admin_meta_send_test_report(email_reporting_option)
|
3341
|
+
def admin_meta_send_test_report(email_reporting_option, target_organization = nil)
|
3298
3342
|
submit_params = {}
|
3299
3343
|
raise TypeError, "'email_reporting_option' expected Comet::EmailReportingOption, got #{email_reporting_option.class}" unless email_reporting_option.is_a? Comet::EmailReportingOption
|
3300
3344
|
|
3301
3345
|
submit_params['EmailReportingOption'] = email_reporting_option.to_json
|
3346
|
+
unless target_organization.nil?
|
3347
|
+
raise TypeError, "'target_organization' expected String, got #{target_organization.class}" unless target_organization.is_a? String
|
3348
|
+
|
3349
|
+
submit_params['TargetOrganization'] = target_organization
|
3350
|
+
end
|
3302
3351
|
|
3303
3352
|
body = perform_request('api/v1/admin/meta/send-test-report', submit_params)
|
3304
3353
|
json_body = JSON.parse body
|
data/lib/comet/definitions.rb
CHANGED
@@ -7,13 +7,13 @@
|
|
7
7
|
|
8
8
|
module Comet
|
9
9
|
|
10
|
-
APPLICATION_VERSION = '
|
10
|
+
APPLICATION_VERSION = '24.3.5'
|
11
11
|
|
12
|
-
APPLICATION_VERSION_MAJOR =
|
12
|
+
APPLICATION_VERSION_MAJOR = 24
|
13
13
|
|
14
|
-
APPLICATION_VERSION_MINOR =
|
14
|
+
APPLICATION_VERSION_MINOR = 3
|
15
15
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
16
|
+
APPLICATION_VERSION_REVISION = 5
|
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
|
@@ -117,6 +117,9 @@ module Comet
|
|
117
117
|
|
118
118
|
DESTINATIONTYPE_WEBDAV = 1010
|
119
119
|
|
120
|
+
# SMB Path
|
121
|
+
DESTINATIONTYPE_SMB = 1011
|
122
|
+
|
120
123
|
# When defining a schedule via policy, use this option to dynamically select the Storage Vault that was created most recently.
|
121
124
|
DESTINATIONTYPE_LATEST = 1100
|
122
125
|
|
@@ -375,6 +378,9 @@ module Comet
|
|
375
378
|
# MSSQLRestoreOpt
|
376
379
|
MSSQL_RESTORE_NORECOVERY = 'NO_RECOVERY'
|
377
380
|
|
381
|
+
# Enable Object Lock capability if the corresponding Days field is greater than zero.
|
382
|
+
New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
383
|
+
# @deprecated This const has been deprecated since Comet version 23.x.x
|
378
384
|
OBJECT_LOCK_LEGACY = 0
|
379
385
|
|
380
386
|
OBJECT_LOCK_ON = 1
|
@@ -435,39 +441,45 @@ module Comet
|
|
435
441
|
|
436
442
|
RELEASE_CODENAME = 'Voyager'
|
437
443
|
|
438
|
-
# RemoteServerType
|
444
|
+
# RemoteServerType: Comet Server
|
439
445
|
REMOTESERVER_COMET = 'comet'
|
440
446
|
|
441
|
-
# RemoteServerType
|
447
|
+
# RemoteServerType: Comet Storage powered by Wasabi
|
442
448
|
REMOTESERVER_COMET_STORAGE = 'cometstorage'
|
443
449
|
|
444
|
-
# RemoteServerType
|
450
|
+
# RemoteServerType: LDAP (Lightweight Directory Access Protocol)
|
445
451
|
REMOTESERVER_LDAP = 'ldap'
|
446
452
|
|
447
|
-
# RemoteServerType
|
453
|
+
# RemoteServerType: OpenID Connect
|
448
454
|
REMOTESERVER_OIDC = 'oidc'
|
449
455
|
|
450
|
-
# RemoteServerType
|
456
|
+
# RemoteServerType: Backblaze B2
|
451
457
|
REMOTESERVER_B2 = 'b2'
|
452
458
|
|
453
|
-
# RemoteServerType
|
459
|
+
# RemoteServerType: Wasabi Cloud Storage
|
454
460
|
REMOTESERVER_WASABI = 'wasabi'
|
455
461
|
|
456
|
-
# RemoteServerType
|
462
|
+
# RemoteServerType: Custom Remote Bucket HTTP protocol
|
457
463
|
REMOTESERVER_CUSTOM = 'custom'
|
458
464
|
|
459
|
-
# RemoteServerType
|
465
|
+
# RemoteServerType: Custom IAM-Compatible
|
460
466
|
REMOTESERVER_S3_GENERIC = 's3'
|
461
467
|
|
462
|
-
# RemoteServerType
|
468
|
+
# RemoteServerType: Amazon Web Services
|
463
469
|
REMOTESERVER_AWS = 'aws'
|
464
470
|
|
465
|
-
# RemoteServerType
|
471
|
+
# RemoteServerType: Storj DCS
|
466
472
|
REMOTESERVER_STORJ = 'storj'
|
467
473
|
|
468
|
-
# RemoteServerType
|
474
|
+
# RemoteServerType: IDrive e2
|
469
475
|
REMOTESERVER_IDRIVEE2 = 'idrivee2'
|
470
476
|
|
477
|
+
# RemoteServerType: Impossible Cloud (Partner API)
|
478
|
+
REMOTESERVER_IMPOSSIBLECLOUD_PARTNER = 'impossiblecloud-partner'
|
479
|
+
|
480
|
+
# RemoteServerType: Impossible Cloud
|
481
|
+
REMOTESERVER_IMPOSSIBLECLOUD_IAM = 'impossiblecloud-iam'
|
482
|
+
|
471
483
|
# ReplicatorState
|
472
484
|
REPLICATOR_STATE_NONE = 0
|
473
485
|
|
@@ -744,6 +756,9 @@ module Comet
|
|
744
756
|
# DefaultSettingMode
|
745
757
|
SETTING_ENFORCED_OFF = 4
|
746
758
|
|
759
|
+
# Severity
|
760
|
+
SEVERITY_DEBUG = 'D'
|
761
|
+
|
747
762
|
# Severity
|
748
763
|
SEVERITY_INFO = 'I'
|
749
764
|
|
@@ -903,6 +918,12 @@ module Comet
|
|
903
918
|
# StoredObjectType
|
904
919
|
STOREDOBJECTTYPE_WINEFS = 'winefs'
|
905
920
|
|
921
|
+
# StoredObjectType
|
922
|
+
STOREDOBJECTTYPE_WINDOWSFILE = 'winfile'
|
923
|
+
|
924
|
+
# StoredObjectType
|
925
|
+
STOREDOBJECTTYPE_WINDOWSDIR = 'windir'
|
926
|
+
|
906
927
|
# StoredObjectType
|
907
928
|
STOREDOBJECTTYPE_EMAILMESSAGE = 'emailmessage'
|
908
929
|
|
@@ -47,6 +47,10 @@ module Comet
|
|
47
47
|
# @type [Boolean] deny_view_server_info
|
48
48
|
attr_accessor :deny_view_server_info
|
49
49
|
|
50
|
+
# This field is available in Comet 24.3.2 and later.
|
51
|
+
# @type [Boolean] prevent_delete_storage_vault
|
52
|
+
attr_accessor :prevent_delete_storage_vault
|
53
|
+
|
50
54
|
# This field is available in Comet 23.6.0 and later.
|
51
55
|
# @type [Boolean] prevent_request_storage_vault
|
52
56
|
attr_accessor :prevent_request_storage_vault
|
@@ -119,6 +123,8 @@ module Comet
|
|
119
123
|
@deny_view_server_history = v
|
120
124
|
when 'DenyViewServerInfo'
|
121
125
|
@deny_view_server_info = v
|
126
|
+
when 'PreventDeleteStorageVault'
|
127
|
+
@prevent_delete_storage_vault = v
|
122
128
|
when 'PreventRequestStorageVault'
|
123
129
|
@prevent_request_storage_vault = v
|
124
130
|
when 'PreventAddCustomStorageVault'
|
@@ -191,6 +197,9 @@ module Comet
|
|
191
197
|
unless @deny_view_server_info.nil?
|
192
198
|
ret['DenyViewServerInfo'] = @deny_view_server_info
|
193
199
|
end
|
200
|
+
unless @prevent_delete_storage_vault.nil?
|
201
|
+
ret['PreventDeleteStorageVault'] = @prevent_delete_storage_vault
|
202
|
+
end
|
194
203
|
unless @prevent_request_storage_vault.nil?
|
195
204
|
ret['PreventRequestStorageVault'] = @prevent_request_storage_vault
|
196
205
|
end
|
@@ -12,6 +12,13 @@ module Comet
|
|
12
12
|
# AmazonAWSVirtualStorageRoleSettings is a typed class wrapper around the underlying Comet Server API data structure.
|
13
13
|
class AmazonAWSVirtualStorageRoleSettings
|
14
14
|
|
15
|
+
# If set, the Storage Template will generate Storage Vaults pointing to a subdirectory within this
|
16
|
+
# bucket. A single dynamic IAM policy will cover all created Storage Vaults.
|
17
|
+
# This is preferable for platforms that have limits on the total number of IAM policies. However, it
|
18
|
+
# requires a high level of IAM compatibility.
|
19
|
+
# If left blank, the Storage Template will generate Storage Vaults pointing to new, separate S3
|
20
|
+
# buckets each time. An additional IAM policy is created for each new Storage Vault.
|
21
|
+
# This is preferable for platforms that have a lower level of IAM compatibility.
|
15
22
|
# @type [String] master_bucket
|
16
23
|
attr_accessor :master_bucket
|
17
24
|
|
@@ -22,14 +29,21 @@ module Comet
|
|
22
29
|
attr_accessor :secret_key
|
23
30
|
|
24
31
|
# @type [Boolean] use_object_lock__legacy__do_not_use
|
32
|
+
# @deprecated This member has been deprecated since Comet version 23.x.x
|
25
33
|
attr_accessor :use_object_lock__legacy__do_not_use
|
26
34
|
|
35
|
+
# Control whether the resulting Storage Vaults are configured for Object Lock. One of the
|
36
|
+
# OBJECT_LOCK_ constants
|
27
37
|
# @type [Number] object_lock_mode
|
28
38
|
attr_accessor :object_lock_mode
|
29
39
|
|
30
40
|
# @type [Number] object_lock_days
|
31
41
|
attr_accessor :object_lock_days
|
32
42
|
|
43
|
+
# Control whether the "Allow removal of deleted files" checkbox is enabled for Storage Vaults
|
44
|
+
# generated from this Storage Template.
|
45
|
+
# When configuring a Storage Template from the Comet Server web interface, this field is set
|
46
|
+
# automatically for Storage Templates using Object Lock.
|
33
47
|
# @type [Boolean] remove_deleted
|
34
48
|
attr_accessor :remove_deleted
|
35
49
|
|
@@ -15,6 +15,10 @@ module Comet
|
|
15
15
|
# @type [String] url
|
16
16
|
attr_accessor :url
|
17
17
|
|
18
|
+
# This field is available in Comet 23.12.5 and later.
|
19
|
+
# @type [Hash{String => String}] custom_headers
|
20
|
+
attr_accessor :custom_headers
|
21
|
+
|
18
22
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
19
23
|
attr_accessor :unknown_json_fields
|
20
24
|
|
@@ -24,6 +28,7 @@ module Comet
|
|
24
28
|
|
25
29
|
def clear
|
26
30
|
@url = ''
|
31
|
+
@custom_headers = {}
|
27
32
|
@unknown_json_fields = {}
|
28
33
|
end
|
29
34
|
|
@@ -44,6 +49,17 @@ module Comet
|
|
44
49
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
45
50
|
|
46
51
|
@url = v
|
52
|
+
when 'CustomHeaders'
|
53
|
+
@custom_headers = {}
|
54
|
+
if v.nil?
|
55
|
+
@custom_headers = {}
|
56
|
+
else
|
57
|
+
v.each do |k1, v1|
|
58
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
59
|
+
|
60
|
+
@custom_headers[k1] = v1
|
61
|
+
end
|
62
|
+
end
|
47
63
|
else
|
48
64
|
@unknown_json_fields[k] = v
|
49
65
|
end
|
@@ -54,6 +70,7 @@ module Comet
|
|
54
70
|
def to_hash
|
55
71
|
ret = {}
|
56
72
|
ret['URL'] = @url
|
73
|
+
ret['CustomHeaders'] = @custom_headers
|
57
74
|
@unknown_json_fields.each do |k, v|
|
58
75
|
ret[k] = v
|
59
76
|
end
|
@@ -193,6 +193,9 @@ module Comet
|
|
193
193
|
# @type [Comet::StorjDestinationLocation] storj
|
194
194
|
attr_accessor :storj
|
195
195
|
|
196
|
+
# @type [Comet::SMBDestinationLocation] smb
|
197
|
+
attr_accessor :smb
|
198
|
+
|
196
199
|
# A list of underlying destinations, that will be combined and presented as one.
|
197
200
|
# @type [Array<Comet::DestinationLocation>] span_targets
|
198
201
|
attr_accessor :span_targets
|
@@ -246,6 +249,10 @@ module Comet
|
|
246
249
|
# @type [Boolean] rebrand_storage
|
247
250
|
attr_accessor :rebrand_storage
|
248
251
|
|
252
|
+
# If not empty, an error occured during a retention pass. Describes the error.
|
253
|
+
# @type [String] retention_error
|
254
|
+
attr_accessor :retention_error
|
255
|
+
|
249
256
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
250
257
|
attr_accessor :unknown_json_fields
|
251
258
|
|
@@ -299,6 +306,7 @@ module Comet
|
|
299
306
|
@b2 = Comet::B2DestinationLocation.new
|
300
307
|
@web_dav = Comet::WebDavDestinationLocation.new
|
301
308
|
@storj = Comet::StorjDestinationLocation.new
|
309
|
+
@smb = Comet::SMBDestinationLocation.new
|
302
310
|
@span_targets = []
|
303
311
|
@tag = ''
|
304
312
|
@encryption_key_encryption_method = 0
|
@@ -307,6 +315,7 @@ module Comet
|
|
307
315
|
@storage_limit_bytes = 0
|
308
316
|
@statistics = Comet::DestinationStatistics.new
|
309
317
|
@default_retention = Comet::RetentionPolicy.new
|
318
|
+
@retention_error = ''
|
310
319
|
@unknown_json_fields = {}
|
311
320
|
end
|
312
321
|
|
@@ -532,6 +541,9 @@ module Comet
|
|
532
541
|
when 'Storj'
|
533
542
|
@storj = Comet::StorjDestinationLocation.new
|
534
543
|
@storj.from_hash(v)
|
544
|
+
when 'SMB'
|
545
|
+
@smb = Comet::SMBDestinationLocation.new
|
546
|
+
@smb.from_hash(v)
|
535
547
|
when 'SpanTargets'
|
536
548
|
if v.nil?
|
537
549
|
@span_targets = []
|
@@ -574,6 +586,10 @@ module Comet
|
|
574
586
|
@default_retention.from_hash(v)
|
575
587
|
when 'RebrandStorage'
|
576
588
|
@rebrand_storage = v
|
589
|
+
when 'RetentionError'
|
590
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
591
|
+
|
592
|
+
@retention_error = v
|
577
593
|
else
|
578
594
|
@unknown_json_fields[k] = v
|
579
595
|
end
|
@@ -634,6 +650,7 @@ module Comet
|
|
634
650
|
ret['B2'] = @b2
|
635
651
|
ret['WebDav'] = @web_dav
|
636
652
|
ret['Storj'] = @storj
|
653
|
+
ret['SMB'] = @smb
|
637
654
|
ret['SpanTargets'] = @span_targets
|
638
655
|
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
639
656
|
ret['Tag'] = @tag
|
@@ -647,6 +664,7 @@ module Comet
|
|
647
664
|
end
|
648
665
|
ret['DefaultRetention'] = @default_retention
|
649
666
|
ret['RebrandStorage'] = @rebrand_storage
|
667
|
+
ret['RetentionError'] = @retention_error
|
650
668
|
@unknown_json_fields.each do |k, v|
|
651
669
|
ret[k] = v
|
652
670
|
end
|
@@ -173,6 +173,9 @@ module Comet
|
|
173
173
|
# @type [Comet::StorjDestinationLocation] storj
|
174
174
|
attr_accessor :storj
|
175
175
|
|
176
|
+
# @type [Comet::SMBDestinationLocation] smb
|
177
|
+
attr_accessor :smb
|
178
|
+
|
176
179
|
# A list of underlying destinations, that will be combined and presented as one.
|
177
180
|
# @type [Array<Comet::DestinationLocation>] span_targets
|
178
181
|
attr_accessor :span_targets
|
@@ -240,6 +243,7 @@ module Comet
|
|
240
243
|
@b2 = Comet::B2DestinationLocation.new
|
241
244
|
@web_dav = Comet::WebDavDestinationLocation.new
|
242
245
|
@storj = Comet::StorjDestinationLocation.new
|
246
|
+
@smb = Comet::SMBDestinationLocation.new
|
243
247
|
@span_targets = []
|
244
248
|
@tag = ''
|
245
249
|
@unknown_json_fields = {}
|
@@ -422,6 +426,9 @@ module Comet
|
|
422
426
|
when 'Storj'
|
423
427
|
@storj = Comet::StorjDestinationLocation.new
|
424
428
|
@storj.from_hash(v)
|
429
|
+
when 'SMB'
|
430
|
+
@smb = Comet::SMBDestinationLocation.new
|
431
|
+
@smb.from_hash(v)
|
425
432
|
when 'SpanTargets'
|
426
433
|
if v.nil?
|
427
434
|
@span_targets = []
|
@@ -492,6 +499,7 @@ module Comet
|
|
492
499
|
ret['B2'] = @b2
|
493
500
|
ret['WebDav'] = @web_dav
|
494
501
|
ret['Storj'] = @storj
|
502
|
+
ret['SMB'] = @smb
|
495
503
|
ret['SpanTargets'] = @span_targets
|
496
504
|
ret['SpanUseStaticSlots'] = @span_use_static_slots
|
497
505
|
ret['Tag'] = @tag
|
@@ -18,12 +18,15 @@ module Comet
|
|
18
18
|
# @type [String] description
|
19
19
|
attr_accessor :description
|
20
20
|
|
21
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
21
22
|
# @type [String] remote_address
|
22
23
|
attr_accessor :remote_address
|
23
24
|
|
25
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
24
26
|
# @type [String] username
|
25
27
|
attr_accessor :username
|
26
28
|
|
29
|
+
# For use with Comet Server (Storage Role / Auth Role)
|
27
30
|
# @type [String] password
|
28
31
|
attr_accessor :password
|
29
32
|
|
@@ -33,25 +36,38 @@ module Comet
|
|
33
36
|
# @type [Comet::OidcConfig] oidc
|
34
37
|
attr_accessor :oidc
|
35
38
|
|
39
|
+
# Backblaze B2 (Storage Template / Constellation)
|
36
40
|
# @type [Comet::B2VirtualStorageRoleSettings] b2
|
37
41
|
attr_accessor :b2
|
38
42
|
|
43
|
+
# Wasabi, or Comet Storage powered by Wasabi (Storage Template / Constellation)
|
39
44
|
# @type [Comet::WasabiVirtualStorageRoleSettings] wasabi
|
40
45
|
attr_accessor :wasabi
|
41
46
|
|
47
|
+
# Custom Remote Bucket HTTP protocol (Storage Template)
|
42
48
|
# @type [Comet::CustomRemoteBucketSettings] custom
|
43
49
|
attr_accessor :custom
|
44
50
|
|
51
|
+
# IDrive e2, or Custom IAM-compatible (Storage Template / Constellation)
|
45
52
|
# @type [Comet::S3GenericVirtualStorageRole] s3
|
46
53
|
attr_accessor :s3
|
47
54
|
|
48
|
-
# Amazon AWS
|
55
|
+
# Amazon AWS (Storage Template / Constellation)
|
49
56
|
# @type [Comet::AmazonAWSVirtualStorageRoleSettings] aws
|
50
57
|
attr_accessor :aws
|
51
58
|
|
59
|
+
# Storj (Storage Template / Constellation)
|
52
60
|
# @type [Comet::StorjVirtualStorageRoleSetting] storj
|
53
61
|
attr_accessor :storj
|
54
62
|
|
63
|
+
# Impossible Cloud Partner API (Storage Template / Constellation)
|
64
|
+
# @type [Comet::ImpossibleCloudPartnerTemplateSettings] imp_partner
|
65
|
+
attr_accessor :imp_partner
|
66
|
+
|
67
|
+
# Impossible Cloud IAM API (Storage Template / Constellation)
|
68
|
+
# @type [Comet::ImpossibleCloudIAMTemplateSettings] imp_user
|
69
|
+
attr_accessor :imp_user
|
70
|
+
|
55
71
|
# @type [Comet::AdminUserPermissions] new_user_permissions
|
56
72
|
attr_accessor :new_user_permissions
|
57
73
|
|
@@ -76,6 +92,8 @@ module Comet
|
|
76
92
|
@s3 = Comet::S3GenericVirtualStorageRole.new
|
77
93
|
@aws = Comet::AmazonAWSVirtualStorageRoleSettings.new
|
78
94
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
95
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
96
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
79
97
|
@new_user_permissions = Comet::AdminUserPermissions.new
|
80
98
|
@unknown_json_fields = {}
|
81
99
|
end
|
@@ -137,6 +155,12 @@ module Comet
|
|
137
155
|
when 'Storj'
|
138
156
|
@storj = Comet::StorjVirtualStorageRoleSetting.new
|
139
157
|
@storj.from_hash(v)
|
158
|
+
when 'ImpPartner'
|
159
|
+
@imp_partner = Comet::ImpossibleCloudPartnerTemplateSettings.new
|
160
|
+
@imp_partner.from_hash(v)
|
161
|
+
when 'ImpUser'
|
162
|
+
@imp_user = Comet::ImpossibleCloudIAMTemplateSettings.new
|
163
|
+
@imp_user.from_hash(v)
|
140
164
|
when 'NewUserPermissions'
|
141
165
|
@new_user_permissions = Comet::AdminUserPermissions.new
|
142
166
|
@new_user_permissions.from_hash(v)
|
@@ -184,6 +208,12 @@ module Comet
|
|
184
208
|
unless @storj.nil?
|
185
209
|
ret['Storj'] = @storj
|
186
210
|
end
|
211
|
+
unless @imp_partner.nil?
|
212
|
+
ret['ImpPartner'] = @imp_partner
|
213
|
+
end
|
214
|
+
unless @imp_user.nil?
|
215
|
+
ret['ImpUser'] = @imp_user
|
216
|
+
end
|
187
217
|
ret['NewUserPermissions'] = @new_user_permissions
|
188
218
|
@unknown_json_fields.each do |k, v|
|
189
219
|
ret[k] = v
|
@@ -0,0 +1,131 @@
|
|
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
|
+
# ImpossibleCloudIAMTemplateSettings is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
# This type is available in Comet 24.3.1 and later.
|
14
|
+
class ImpossibleCloudIAMTemplateSettings
|
15
|
+
|
16
|
+
# @type [String] access_key
|
17
|
+
attr_accessor :access_key
|
18
|
+
|
19
|
+
# @type [String] secret_key
|
20
|
+
attr_accessor :secret_key
|
21
|
+
|
22
|
+
# Optional. The region for both IAM communication and for provisioning new buckets. If blank, uses
|
23
|
+
# the default region for Impossible Cloud (eu-central-2).
|
24
|
+
# @type [String] region
|
25
|
+
attr_accessor :region
|
26
|
+
|
27
|
+
# @type [Boolean] use_object_lock__legacy__do_not_use
|
28
|
+
# @deprecated This member has been deprecated since Comet version 23.x.x
|
29
|
+
attr_accessor :use_object_lock__legacy__do_not_use
|
30
|
+
|
31
|
+
# Control whether the resulting Storage Vaults are configured for Object Lock. One of the
|
32
|
+
# OBJECT_LOCK_ constants
|
33
|
+
# @type [Number] object_lock_mode
|
34
|
+
attr_accessor :object_lock_mode
|
35
|
+
|
36
|
+
# @type [Number] object_lock_days
|
37
|
+
attr_accessor :object_lock_days
|
38
|
+
|
39
|
+
# Control whether the "Allow removal of deleted files" checkbox is enabled for Storage Vaults
|
40
|
+
# generated from this Storage Template.
|
41
|
+
# When configuring a Storage Template from the Comet Server web interface, this field is set
|
42
|
+
# automatically for Storage Templates using Object Lock.
|
43
|
+
# @type [Boolean] remove_deleted
|
44
|
+
attr_accessor :remove_deleted
|
45
|
+
|
46
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
47
|
+
attr_accessor :unknown_json_fields
|
48
|
+
|
49
|
+
def initialize
|
50
|
+
clear
|
51
|
+
end
|
52
|
+
|
53
|
+
def clear
|
54
|
+
@access_key = ''
|
55
|
+
@secret_key = ''
|
56
|
+
@region = ''
|
57
|
+
@object_lock_mode = 0
|
58
|
+
@object_lock_days = 0
|
59
|
+
@unknown_json_fields = {}
|
60
|
+
end
|
61
|
+
|
62
|
+
# @param [String] json_string The complete object in JSON format
|
63
|
+
def from_json(json_string)
|
64
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
65
|
+
|
66
|
+
from_hash(JSON.parse(json_string))
|
67
|
+
end
|
68
|
+
|
69
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
70
|
+
def from_hash(obj)
|
71
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
72
|
+
|
73
|
+
obj.each do |k, v|
|
74
|
+
case k
|
75
|
+
when 'AccessKey'
|
76
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
77
|
+
|
78
|
+
@access_key = v
|
79
|
+
when 'SecretKey'
|
80
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
81
|
+
|
82
|
+
@secret_key = v
|
83
|
+
when 'Region'
|
84
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
|
+
|
86
|
+
@region = v
|
87
|
+
when 'UseObjectLock'
|
88
|
+
@use_object_lock__legacy__do_not_use = v
|
89
|
+
when 'ObjectLockMode'
|
90
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
91
|
+
|
92
|
+
@object_lock_mode = v
|
93
|
+
when 'ObjectLockDays'
|
94
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
95
|
+
|
96
|
+
@object_lock_days = v
|
97
|
+
when 'RemoveDeleted'
|
98
|
+
@remove_deleted = v
|
99
|
+
else
|
100
|
+
@unknown_json_fields[k] = v
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# @return [Hash] The complete object as a Ruby hash
|
106
|
+
def to_hash
|
107
|
+
ret = {}
|
108
|
+
ret['AccessKey'] = @access_key
|
109
|
+
ret['SecretKey'] = @secret_key
|
110
|
+
ret['Region'] = @region
|
111
|
+
ret['UseObjectLock'] = @use_object_lock__legacy__do_not_use
|
112
|
+
ret['ObjectLockMode'] = @object_lock_mode
|
113
|
+
ret['ObjectLockDays'] = @object_lock_days
|
114
|
+
ret['RemoveDeleted'] = @remove_deleted
|
115
|
+
@unknown_json_fields.each do |k, v|
|
116
|
+
ret[k] = v
|
117
|
+
end
|
118
|
+
ret
|
119
|
+
end
|
120
|
+
|
121
|
+
# @return [Hash] The complete object as a Ruby hash
|
122
|
+
def to_h
|
123
|
+
to_hash
|
124
|
+
end
|
125
|
+
|
126
|
+
# @return [String] The complete object as a JSON string
|
127
|
+
def to_json(options = {})
|
128
|
+
to_hash.to_json(options)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|