comet_backup_ruby_sdk 2.41.0 → 2.43.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 +19 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +253 -12
- data/lib/comet/definitions.rb +51 -7
- data/lib/comet/models/backup_job_advanced_options.rb +10 -0
- data/lib/comet/models/backup_job_detail.rb +12 -0
- data/lib/comet/models/backup_rule_config.rb +10 -0
- data/lib/comet/models/branding_options.rb +30 -0
- data/lib/comet/models/branding_properties.rb +30 -0
- data/lib/comet/models/browse_proxmox_nodes_response.rb +99 -0
- data/lib/comet/models/browse_proxmox_response.rb +98 -0
- data/lib/comet/models/browse_proxmox_storage_response.rb +98 -0
- data/lib/comet/models/dispatch_with_job_idresponse.rb +94 -0
- data/lib/comet/models/external_authentication_source.rb +3 -3
- data/lib/comet/models/office_365custom_setting_v2.rb +16 -5
- data/lib/comet/models/partition.rb +20 -0
- data/lib/comet/models/private_branding_properties.rb +30 -0
- data/lib/comet/models/protected_item_with_backup_rules_response.rb +119 -0
- data/lib/comet/models/proxmox_connection.rb +72 -0
- data/lib/comet/models/proxmox_restore_target_options.rb +92 -0
- data/lib/comet/models/pvebackup_disk.rb +92 -0
- data/lib/comet/models/pvebackup_node.rb +105 -0
- data/lib/comet/models/pvebackup_vm.rb +128 -0
- data/lib/comet/models/pvedisk.rb +138 -0
- data/lib/comet/models/pveparams.rb +140 -0
- data/lib/comet/models/pvestorage_name.rb +83 -0
- data/lib/comet/models/pvevm.rb +150 -0
- data/lib/comet/models/registration_lobby_connection.rb +11 -0
- data/lib/comet/models/remote_server_address.rb +3 -3
- data/lib/comet/models/remote_storage_option.rb +3 -3
- data/lib/comet/models/replica_server.rb +3 -3
- data/lib/comet/models/request_storage_vault_response_message.rb +17 -0
- data/lib/comet/models/restore_job_advanced_options.rb +11 -0
- data/lib/comet/models/retention_range.rb +18 -0
- data/lib/comet/models/schedule_config.rb +18 -0
- data/lib/comet/models/self_backup_export_options.rb +2 -2
- data/lib/comet/models/self_backup_target.rb +2 -2
- data/lib/comet/models/source_config.rb +7 -0
- data/lib/comet/models/user_policy.rb +11 -0
- data/lib/comet/models/user_profile_config.rb +8 -0
- data/lib/comet/models/vault_snapshot.rb +19 -0
- data/lib/comet/models/windows_code_sign_properties.rb +30 -0
- data/lib/comet_backup_ruby_sdk.rb +14 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 223786459d14daf5ee8f6051b12e17a3421953090d8ef85ead703a849a40556a
|
|
4
|
+
data.tar.gz: 7946efba6f9689c679d407ef8188bd491aa73d91bfe73a074a518ef2b9b8232a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 789be6fbbbf77f288c81b44cbdcf1ce99e8b743dfe83b82a778c4cce3467905f791b69f093379a12d05bafd2fbc9377e91519e3700f6b9d2b4de07e5b50272af
|
|
7
|
+
data.tar.gz: f6b7ab99a8c0544afdab435e3c8f5e77d671b3d8a3a7492fe8e87b38ae350bbebffab5e09977151dd7dd34bd2519922c3a1f65343bf05ff9a9cb9a99e6728621
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2025-11-14 v2.43.0
|
|
4
|
+
|
|
5
|
+
- Based on Comet 25.9.6
|
|
6
|
+
- Add new API methods for getting, setting, and deleting Protected Items and
|
|
7
|
+
their associated schedules
|
|
8
|
+
- Add new API methods for live connection credential/session management
|
|
9
|
+
- Add JobID field to API response when starting jobs via the dispatcher on
|
|
10
|
+
devices running Comet 25.9.6 or newer
|
|
11
|
+
- Add support for custom tags on backup jobs to allow grouping of
|
|
12
|
+
snapshots/jobs
|
|
13
|
+
- Add support SAS Relic codesigning
|
|
14
|
+
- Improve documentation for Proxmox API types
|
|
15
|
+
|
|
16
|
+
## 2025-08-15 v2.42.0
|
|
17
|
+
|
|
18
|
+
- Based on Comet 25.6.8
|
|
19
|
+
- Add support for Proxmox
|
|
20
|
+
- Add profile hash to some API endpoints
|
|
21
|
+
|
|
3
22
|
## 2025-02-17 v2.41.0
|
|
4
23
|
Update to 24.12.5
|
|
5
24
|
|
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.43.0'
|
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
|
@@ -1059,6 +1059,33 @@ module Comet
|
|
|
1059
1059
|
ret
|
|
1060
1060
|
end
|
|
1061
1061
|
|
|
1062
|
+
# AdminDeleteProtectedItem
|
|
1063
|
+
#
|
|
1064
|
+
# Delete a Protected Item.
|
|
1065
|
+
#
|
|
1066
|
+
# You must supply administrator authentication credentials to use this API.
|
|
1067
|
+
# This API requires the Auth Role to be enabled.
|
|
1068
|
+
#
|
|
1069
|
+
# @param [String] target_user Selected account username
|
|
1070
|
+
# @param [String] source_id Selected Protected Item GUID
|
|
1071
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
1072
|
+
def admin_delete_protected_item(target_user, source_id)
|
|
1073
|
+
submit_params = {}
|
|
1074
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
1075
|
+
|
|
1076
|
+
submit_params['TargetUser'] = target_user
|
|
1077
|
+
raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String
|
|
1078
|
+
|
|
1079
|
+
submit_params['SourceID'] = source_id
|
|
1080
|
+
|
|
1081
|
+
body = perform_request('api/v1/admin/delete-protected-item', submit_params)
|
|
1082
|
+
json_body = JSON.parse body
|
|
1083
|
+
check_status json_body
|
|
1084
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
1085
|
+
ret.from_hash(json_body)
|
|
1086
|
+
ret
|
|
1087
|
+
end
|
|
1088
|
+
|
|
1062
1089
|
# AdminDeleteUser
|
|
1063
1090
|
#
|
|
1064
1091
|
# Delete user account.
|
|
@@ -1325,6 +1352,30 @@ module Comet
|
|
|
1325
1352
|
ret
|
|
1326
1353
|
end
|
|
1327
1354
|
|
|
1355
|
+
# AdminDispatcherForceLogin
|
|
1356
|
+
#
|
|
1357
|
+
# Instruct a live connected device to re-enter login credentials.
|
|
1358
|
+
# The device will terminate its live-connection process and will not reconnect.
|
|
1359
|
+
#
|
|
1360
|
+
# You must supply administrator authentication credentials to use this API.
|
|
1361
|
+
# This API requires the Auth Role to be enabled.
|
|
1362
|
+
#
|
|
1363
|
+
# @param [String] target_id The live connection GUID
|
|
1364
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
1365
|
+
def admin_dispatcher_force_login(target_id)
|
|
1366
|
+
submit_params = {}
|
|
1367
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1368
|
+
|
|
1369
|
+
submit_params['TargetID'] = target_id
|
|
1370
|
+
|
|
1371
|
+
body = perform_request('api/v1/admin/dispatcher/force-login', submit_params)
|
|
1372
|
+
json_body = JSON.parse body
|
|
1373
|
+
check_status json_body
|
|
1374
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
1375
|
+
ret.from_hash(json_body)
|
|
1376
|
+
ret
|
|
1377
|
+
end
|
|
1378
|
+
|
|
1328
1379
|
# AdminDispatcherGetDefaultLoginUrl
|
|
1329
1380
|
#
|
|
1330
1381
|
# Get the default login URL for a tenant.
|
|
@@ -1749,6 +1800,87 @@ module Comet
|
|
|
1749
1800
|
ret
|
|
1750
1801
|
end
|
|
1751
1802
|
|
|
1803
|
+
# AdminDispatcherRequestBrowseProxmox
|
|
1804
|
+
#
|
|
1805
|
+
# Request a list of Proxmox virtual machines and containers.
|
|
1806
|
+
#
|
|
1807
|
+
# You must supply administrator authentication credentials to use this API.
|
|
1808
|
+
# This API requires the Auth Role to be enabled.
|
|
1809
|
+
#
|
|
1810
|
+
# @param [String] target_id The live connection GUID
|
|
1811
|
+
# @param [Comet::ProxmoxConnection] credentials The Proxmox connection settings
|
|
1812
|
+
# @return [Comet::BrowseProxmoxResponse]
|
|
1813
|
+
def admin_dispatcher_request_browse_proxmox(target_id, credentials)
|
|
1814
|
+
submit_params = {}
|
|
1815
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1816
|
+
|
|
1817
|
+
submit_params['TargetID'] = target_id
|
|
1818
|
+
raise TypeError, "'credentials' expected Comet::ProxmoxConnection, got #{credentials.class}" unless credentials.is_a? Comet::ProxmoxConnection
|
|
1819
|
+
|
|
1820
|
+
submit_params['Credentials'] = credentials.to_json
|
|
1821
|
+
|
|
1822
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox', submit_params)
|
|
1823
|
+
json_body = JSON.parse body
|
|
1824
|
+
check_status json_body
|
|
1825
|
+
ret = Comet::BrowseProxmoxResponse.new
|
|
1826
|
+
ret.from_hash(json_body)
|
|
1827
|
+
ret
|
|
1828
|
+
end
|
|
1829
|
+
|
|
1830
|
+
# AdminDispatcherRequestBrowseProxmoxNodes
|
|
1831
|
+
#
|
|
1832
|
+
# Request a list of Proxmox nodes.
|
|
1833
|
+
#
|
|
1834
|
+
# You must supply administrator authentication credentials to use this API.
|
|
1835
|
+
# This API requires the Auth Role to be enabled.
|
|
1836
|
+
#
|
|
1837
|
+
# @param [String] target_id The live connection GUID
|
|
1838
|
+
# @param [Comet::SSHConnection] credentials The SSH connection settings
|
|
1839
|
+
# @return [Comet::BrowseProxmoxNodesResponse]
|
|
1840
|
+
def admin_dispatcher_request_browse_proxmox_nodes(target_id, credentials)
|
|
1841
|
+
submit_params = {}
|
|
1842
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1843
|
+
|
|
1844
|
+
submit_params['TargetID'] = target_id
|
|
1845
|
+
raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection
|
|
1846
|
+
|
|
1847
|
+
submit_params['Credentials'] = credentials.to_json
|
|
1848
|
+
|
|
1849
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/nodes', submit_params)
|
|
1850
|
+
json_body = JSON.parse body
|
|
1851
|
+
check_status json_body
|
|
1852
|
+
ret = Comet::BrowseProxmoxNodesResponse.new
|
|
1853
|
+
ret.from_hash(json_body)
|
|
1854
|
+
ret
|
|
1855
|
+
end
|
|
1856
|
+
|
|
1857
|
+
# AdminDispatcherRequestBrowseProxmoxStorage
|
|
1858
|
+
#
|
|
1859
|
+
# Request a list of configured Proxmox storage.
|
|
1860
|
+
#
|
|
1861
|
+
# You must supply administrator authentication credentials to use this API.
|
|
1862
|
+
# This API requires the Auth Role to be enabled.
|
|
1863
|
+
#
|
|
1864
|
+
# @param [String] target_id The live connection GUID
|
|
1865
|
+
# @param [Comet::SSHConnection] credentials The SSH connection settings
|
|
1866
|
+
# @return [Comet::BrowseProxmoxStorageResponse]
|
|
1867
|
+
def admin_dispatcher_request_browse_proxmox_storage(target_id, credentials)
|
|
1868
|
+
submit_params = {}
|
|
1869
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
1870
|
+
|
|
1871
|
+
submit_params['TargetID'] = target_id
|
|
1872
|
+
raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection
|
|
1873
|
+
|
|
1874
|
+
submit_params['Credentials'] = credentials.to_json
|
|
1875
|
+
|
|
1876
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/storage', submit_params)
|
|
1877
|
+
json_body = JSON.parse body
|
|
1878
|
+
check_status json_body
|
|
1879
|
+
ret = Comet::BrowseProxmoxStorageResponse.new
|
|
1880
|
+
ret.from_hash(json_body)
|
|
1881
|
+
ret
|
|
1882
|
+
end
|
|
1883
|
+
|
|
1752
1884
|
# AdminDispatcherRequestBrowseVmware
|
|
1753
1885
|
#
|
|
1754
1886
|
# Request a list of VMware vSphere virtual machines.
|
|
@@ -2146,7 +2278,7 @@ module Comet
|
|
|
2146
2278
|
#
|
|
2147
2279
|
# @param [String] target_id The live connection GUID
|
|
2148
2280
|
# @param [String] backup_rule The schedule GUID
|
|
2149
|
-
# @return [Comet::
|
|
2281
|
+
# @return [Comet::DispatchWithJobIDResponse]
|
|
2150
2282
|
def admin_dispatcher_run_backup(target_id, backup_rule)
|
|
2151
2283
|
submit_params = {}
|
|
2152
2284
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
@@ -2159,7 +2291,7 @@ module Comet
|
|
|
2159
2291
|
body = perform_request('api/v1/admin/dispatcher/run-backup', submit_params)
|
|
2160
2292
|
json_body = JSON.parse body
|
|
2161
2293
|
check_status json_body
|
|
2162
|
-
ret = Comet::
|
|
2294
|
+
ret = Comet::DispatchWithJobIDResponse.new
|
|
2163
2295
|
ret.from_hash(json_body)
|
|
2164
2296
|
ret
|
|
2165
2297
|
end
|
|
@@ -2175,7 +2307,7 @@ module Comet
|
|
|
2175
2307
|
# @param [String] source The Protected Item GUID
|
|
2176
2308
|
# @param [String] destination The Storage Vault GUID
|
|
2177
2309
|
# @param [Comet::BackupJobAdvancedOptions] options (Optional) Extra job parameters (>= 19.3.6)
|
|
2178
|
-
# @return [Comet::
|
|
2310
|
+
# @return [Comet::DispatchWithJobIDResponse]
|
|
2179
2311
|
def admin_dispatcher_run_backup_custom(target_id, source, destination, options = nil)
|
|
2180
2312
|
submit_params = {}
|
|
2181
2313
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
@@ -2196,7 +2328,7 @@ module Comet
|
|
|
2196
2328
|
body = perform_request('api/v1/admin/dispatcher/run-backup-custom', submit_params)
|
|
2197
2329
|
json_body = JSON.parse body
|
|
2198
2330
|
check_status json_body
|
|
2199
|
-
ret = Comet::
|
|
2331
|
+
ret = Comet::DispatchWithJobIDResponse.new
|
|
2200
2332
|
ret.from_hash(json_body)
|
|
2201
2333
|
ret
|
|
2202
2334
|
end
|
|
@@ -2215,7 +2347,7 @@ module Comet
|
|
|
2215
2347
|
# @param [String] destination The Storage Vault ID
|
|
2216
2348
|
# @param [String] snapshot (Optional) If present, restore a specific snapshot. Otherwise, restore the latest snapshot for the selected Protected Item + Storage Vault pair
|
|
2217
2349
|
# @param [Array<String>] paths (Optional) If present, restore these paths only. Otherwise, restore all data (>= 19.3.0)
|
|
2218
|
-
# @return [Comet::
|
|
2350
|
+
# @return [Comet::DispatchWithJobIDResponse]
|
|
2219
2351
|
def admin_dispatcher_run_restore(target_id, path, source, destination, snapshot = nil, paths = nil)
|
|
2220
2352
|
submit_params = {}
|
|
2221
2353
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
@@ -2244,7 +2376,7 @@ module Comet
|
|
|
2244
2376
|
body = perform_request('api/v1/admin/dispatcher/run-restore', submit_params)
|
|
2245
2377
|
json_body = JSON.parse body
|
|
2246
2378
|
check_status json_body
|
|
2247
|
-
ret = Comet::
|
|
2379
|
+
ret = Comet::DispatchWithJobIDResponse.new
|
|
2248
2380
|
ret.from_hash(json_body)
|
|
2249
2381
|
ret
|
|
2250
2382
|
end
|
|
@@ -2266,7 +2398,7 @@ module Comet
|
|
|
2266
2398
|
# @param [Number] known_file_count (Optional) The number of files to restore, if known. Supplying this means we don't need to walk the entire tree just to find the file count and will speed up the restoration process.
|
|
2267
2399
|
# @param [Number] known_byte_count (Optional) The total size in bytes of files to restore, if known. Supplying this means we don't need to walk the entire tree just to find the total file size and will speed up the restoration process.
|
|
2268
2400
|
# @param [Number] known_dir_count (Optional) The number of directories to restore, if known. Supplying this means we don't need to walk the entire tree just to find the number of directories and will speed up the restoration process.
|
|
2269
|
-
# @return [Comet::
|
|
2401
|
+
# @return [Comet::DispatchWithJobIDResponse]
|
|
2270
2402
|
def admin_dispatcher_run_restore_custom(target_id, source, destination, options, snapshot = nil, paths = nil, known_file_count = nil, known_byte_count = nil, known_dir_count = nil)
|
|
2271
2403
|
submit_params = {}
|
|
2272
2404
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
@@ -2310,7 +2442,7 @@ module Comet
|
|
|
2310
2442
|
body = perform_request('api/v1/admin/dispatcher/run-restore-custom', submit_params)
|
|
2311
2443
|
json_body = JSON.parse body
|
|
2312
2444
|
check_status json_body
|
|
2313
|
-
ret = Comet::
|
|
2445
|
+
ret = Comet::DispatchWithJobIDResponse.new
|
|
2314
2446
|
ret.from_hash(json_body)
|
|
2315
2447
|
ret
|
|
2316
2448
|
end
|
|
@@ -2413,8 +2545,9 @@ module Comet
|
|
|
2413
2545
|
#
|
|
2414
2546
|
# @param [String] target_id The live connection GUID
|
|
2415
2547
|
# @param [String] destination The Storage Vault GUID
|
|
2548
|
+
# @param [Boolean] allow_unsafe (Optional) Allow legacy Storage Vault unlocking, which is unsafe in some cases.
|
|
2416
2549
|
# @return [Comet::CometAPIResponseMessage]
|
|
2417
|
-
def admin_dispatcher_unlock(target_id, destination)
|
|
2550
|
+
def admin_dispatcher_unlock(target_id, destination, allow_unsafe = nil)
|
|
2418
2551
|
submit_params = {}
|
|
2419
2552
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
2420
2553
|
|
|
@@ -2422,6 +2555,9 @@ module Comet
|
|
|
2422
2555
|
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
|
2423
2556
|
|
|
2424
2557
|
submit_params['Destination'] = destination
|
|
2558
|
+
unless allow_unsafe.nil?
|
|
2559
|
+
submit_params['AllowUnsafe'] = (allow_unsafe ? 1 : 0)
|
|
2560
|
+
end
|
|
2425
2561
|
|
|
2426
2562
|
body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
|
|
2427
2563
|
json_body = JSON.parse body
|
|
@@ -2431,6 +2567,33 @@ module Comet
|
|
|
2431
2567
|
ret
|
|
2432
2568
|
end
|
|
2433
2569
|
|
|
2570
|
+
# AdminDispatcherUpdateLoginPassword
|
|
2571
|
+
#
|
|
2572
|
+
# Instruct a live connected device to update its login password.
|
|
2573
|
+
#
|
|
2574
|
+
# You must supply administrator authentication credentials to use this API.
|
|
2575
|
+
# This API requires the Auth Role to be enabled.
|
|
2576
|
+
#
|
|
2577
|
+
# @param [String] target_id The live connection GUID
|
|
2578
|
+
# @param [String] new_password The new password of this user
|
|
2579
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
2580
|
+
def admin_dispatcher_update_login_password(target_id, new_password)
|
|
2581
|
+
submit_params = {}
|
|
2582
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
|
2583
|
+
|
|
2584
|
+
submit_params['TargetID'] = target_id
|
|
2585
|
+
raise TypeError, "'new_password' expected String, got #{new_password.class}" unless new_password.is_a? String
|
|
2586
|
+
|
|
2587
|
+
submit_params['NewPassword'] = new_password
|
|
2588
|
+
|
|
2589
|
+
body = perform_request('api/v1/admin/dispatcher/update-login-password', submit_params)
|
|
2590
|
+
json_body = JSON.parse body
|
|
2591
|
+
check_status json_body
|
|
2592
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
2593
|
+
ret.from_hash(json_body)
|
|
2594
|
+
ret
|
|
2595
|
+
end
|
|
2596
|
+
|
|
2434
2597
|
# AdminDispatcherUpdateLoginUrl
|
|
2435
2598
|
#
|
|
2436
2599
|
# Instruct a live connected device to update its login server URL.
|
|
@@ -2829,6 +2992,33 @@ module Comet
|
|
|
2829
2992
|
ret
|
|
2830
2993
|
end
|
|
2831
2994
|
|
|
2995
|
+
# AdminGetProtectedItemWithBackupRules
|
|
2996
|
+
#
|
|
2997
|
+
# Get a Protected Item with its backup rules.
|
|
2998
|
+
#
|
|
2999
|
+
# You must supply administrator authentication credentials to use this API.
|
|
3000
|
+
# This API requires the Auth Role to be enabled.
|
|
3001
|
+
#
|
|
3002
|
+
# @param [String] target_user Selected account username
|
|
3003
|
+
# @param [String] source_id Selected Protected Item GUID
|
|
3004
|
+
# @return [Comet::ProtectedItemWithBackupRulesResponse]
|
|
3005
|
+
def admin_get_protected_item_with_backup_rules(target_user, source_id)
|
|
3006
|
+
submit_params = {}
|
|
3007
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
3008
|
+
|
|
3009
|
+
submit_params['TargetUser'] = target_user
|
|
3010
|
+
raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String
|
|
3011
|
+
|
|
3012
|
+
submit_params['SourceID'] = source_id
|
|
3013
|
+
|
|
3014
|
+
body = perform_request('api/v1/admin/get-protected-item-with-backup-rules', submit_params)
|
|
3015
|
+
json_body = JSON.parse body
|
|
3016
|
+
check_status json_body
|
|
3017
|
+
ret = Comet::ProtectedItemWithBackupRulesResponse.new
|
|
3018
|
+
ret.from_hash(json_body)
|
|
3019
|
+
ret
|
|
3020
|
+
end
|
|
3021
|
+
|
|
2832
3022
|
# AdminGetUserProfile
|
|
2833
3023
|
#
|
|
2834
3024
|
# Get user account profile.
|
|
@@ -4231,8 +4421,9 @@ module Comet
|
|
|
4231
4421
|
# @param [String] storage_provider ID for the storage template destination
|
|
4232
4422
|
# @param [String] self_address (Optional) The external URL for this server. Used to resolve conflicts
|
|
4233
4423
|
# @param [String] device_id (Optional) The ID of the device to be added as a associated device of the Storage Vault
|
|
4424
|
+
# @param [String] profile_hash (Optional) The profile hash of the user profile
|
|
4234
4425
|
# @return [Comet::RequestStorageVaultResponseMessage]
|
|
4235
|
-
def admin_request_storage_vault(target_user, storage_provider, self_address = nil, device_id = nil)
|
|
4426
|
+
def admin_request_storage_vault(target_user, storage_provider, self_address = nil, device_id = nil, profile_hash = nil)
|
|
4236
4427
|
submit_params = {}
|
|
4237
4428
|
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
4238
4429
|
|
|
@@ -4252,6 +4443,11 @@ module Comet
|
|
|
4252
4443
|
|
|
4253
4444
|
submit_params['DeviceID'] = device_id
|
|
4254
4445
|
end
|
|
4446
|
+
unless profile_hash.nil?
|
|
4447
|
+
raise TypeError, "'profile_hash' expected String, got #{profile_hash.class}" unless profile_hash.is_a? String
|
|
4448
|
+
|
|
4449
|
+
submit_params['ProfileHash'] = profile_hash
|
|
4450
|
+
end
|
|
4255
4451
|
|
|
4256
4452
|
body = perform_request('api/v1/admin/request-storage-vault', submit_params)
|
|
4257
4453
|
json_body = JSON.parse body
|
|
@@ -4373,6 +4569,51 @@ module Comet
|
|
|
4373
4569
|
ret
|
|
4374
4570
|
end
|
|
4375
4571
|
|
|
4572
|
+
# AdminSetProtectedItemWithBackupRules
|
|
4573
|
+
#
|
|
4574
|
+
# Add or update a Protected Item with its backup rules.
|
|
4575
|
+
#
|
|
4576
|
+
# You must supply administrator authentication credentials to use this API.
|
|
4577
|
+
# This API requires the Auth Role to be enabled.
|
|
4578
|
+
#
|
|
4579
|
+
# @param [String] target_user Selected account username
|
|
4580
|
+
# @param [String] source_id Selected Protected Item GUID
|
|
4581
|
+
# @param [String] require_hash (Optional) Previous account profile hash
|
|
4582
|
+
# @param [Comet::SourceConfig] source (Optional) Optional Protected Item to create or update
|
|
4583
|
+
# @param [Hash{String => Comet::BackupRuleConfig}] backup_rules (Optional) Optional backup rules for the Protected Item
|
|
4584
|
+
# @return [Comet::CometAPIResponseMessage]
|
|
4585
|
+
def admin_set_protected_item_with_backup_rules(target_user, source_id, require_hash = nil, source = nil, backup_rules = nil)
|
|
4586
|
+
submit_params = {}
|
|
4587
|
+
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
4588
|
+
|
|
4589
|
+
submit_params['TargetUser'] = target_user
|
|
4590
|
+
raise TypeError, "'source_id' expected String, got #{source_id.class}" unless source_id.is_a? String
|
|
4591
|
+
|
|
4592
|
+
submit_params['SourceID'] = source_id
|
|
4593
|
+
unless require_hash.nil?
|
|
4594
|
+
raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
|
|
4595
|
+
|
|
4596
|
+
submit_params['RequireHash'] = require_hash
|
|
4597
|
+
end
|
|
4598
|
+
unless source.nil?
|
|
4599
|
+
raise TypeError, "'source' expected Comet::SourceConfig, got #{source.class}" unless source.is_a? Comet::SourceConfig
|
|
4600
|
+
|
|
4601
|
+
submit_params['Source'] = source.to_json
|
|
4602
|
+
end
|
|
4603
|
+
unless backup_rules.nil?
|
|
4604
|
+
raise TypeError, "'backup_rules' expected Hash, got #{backup_rules.class}" unless backup_rules.is_a? Hash
|
|
4605
|
+
|
|
4606
|
+
submit_params['BackupRules'] = backup_rules.to_json
|
|
4607
|
+
end
|
|
4608
|
+
|
|
4609
|
+
body = perform_request('api/v1/admin/set-protected-item-with-backup-rules', submit_params)
|
|
4610
|
+
json_body = JSON.parse body
|
|
4611
|
+
check_status json_body
|
|
4612
|
+
ret = Comet::CometAPIResponseMessage.new
|
|
4613
|
+
ret.from_hash(json_body)
|
|
4614
|
+
ret
|
|
4615
|
+
end
|
|
4616
|
+
|
|
4376
4617
|
# AdminSetUserProfile
|
|
4377
4618
|
#
|
|
4378
4619
|
# Modify user account profile.
|
|
@@ -4413,7 +4654,7 @@ module Comet
|
|
|
4413
4654
|
# @param [Comet::UserProfileConfig] profile_data Modified user profile
|
|
4414
4655
|
# @param [String] require_hash Previous hash parameter
|
|
4415
4656
|
# @param [Comet::AdminOptions] admin_options (Optional) Instructions for modifying user profile
|
|
4416
|
-
# @return [Comet::
|
|
4657
|
+
# @return [Comet::GetProfileAndHashResponseMessage]
|
|
4417
4658
|
def admin_set_user_profile_hash(target_user, profile_data, require_hash, admin_options = nil)
|
|
4418
4659
|
submit_params = {}
|
|
4419
4660
|
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
|
@@ -4434,7 +4675,7 @@ module Comet
|
|
|
4434
4675
|
body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
|
|
4435
4676
|
json_body = JSON.parse body
|
|
4436
4677
|
check_status json_body
|
|
4437
|
-
ret = Comet::
|
|
4678
|
+
ret = Comet::GetProfileAndHashResponseMessage.new
|
|
4438
4679
|
ret.from_hash(json_body)
|
|
4439
4680
|
ret
|
|
4440
4681
|
end
|
data/lib/comet/definitions.rb
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
module Comet
|
|
9
9
|
|
|
10
|
-
APPLICATION_VERSION = '
|
|
10
|
+
APPLICATION_VERSION = '25.9.6'
|
|
11
11
|
|
|
12
|
-
APPLICATION_VERSION_MAJOR =
|
|
12
|
+
APPLICATION_VERSION_MAJOR = 25
|
|
13
13
|
|
|
14
|
-
APPLICATION_VERSION_MINOR =
|
|
14
|
+
APPLICATION_VERSION_MINOR = 9
|
|
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
|
|
@@ -105,6 +105,9 @@ module Comet
|
|
|
105
105
|
|
|
106
106
|
DESTINATIONTYPE___INVALID = 0
|
|
107
107
|
|
|
108
|
+
# Storage type that is applied when Storage Gateway fails to launch correctly
|
|
109
|
+
DESTINATIONTYPE_ERROR = 1
|
|
110
|
+
|
|
108
111
|
# S3-compatible, or a specific S3 service such as AWS S3, Wasabi, or iDrive e2
|
|
109
112
|
DESTINATIONTYPE_S3 = 1000
|
|
110
113
|
|
|
@@ -236,6 +239,9 @@ module Comet
|
|
|
236
239
|
# VMware
|
|
237
240
|
ENGINE_BUILTIN_VMWARE = 'engine1/vmware'
|
|
238
241
|
|
|
242
|
+
# Proxmox (PVE)
|
|
243
|
+
ENGINE_BUILTIN_PROXMOX = 'engine1/proxmox'
|
|
244
|
+
|
|
239
245
|
# FtpsModeType: Use plain FTP, do not use FTPS.
|
|
240
246
|
FTPS_MODE_PLAINTEXT = 0
|
|
241
247
|
|
|
@@ -322,6 +328,9 @@ module Comet
|
|
|
322
328
|
# JobStatus: The job has encountered an error and will wait to retry.
|
|
323
329
|
JOB_STATUS_RUNNING_TRYAGAIN = 6003
|
|
324
330
|
|
|
331
|
+
# JobStatus: The job has been created by the server but has not yet been initialized by the client.
|
|
332
|
+
JOB_STATUS_NOT_YET_STARTED = 6004
|
|
333
|
+
|
|
325
334
|
# JobStatus
|
|
326
335
|
JOB_STATUS_RUNNING__MAX = 6999
|
|
327
336
|
|
|
@@ -433,6 +442,8 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
433
442
|
|
|
434
443
|
OFFICE365_REGION_US_DOD = 'USGovtGccDoDCloud'
|
|
435
444
|
|
|
445
|
+
OFFICE365_REGION_PUBLIC_TEST = 'GlobalPublicCloudTest'
|
|
446
|
+
|
|
436
447
|
# ExtraFileExclusionOSRestriction: Applies to any device
|
|
437
448
|
OS_ANY = 0
|
|
438
449
|
|
|
@@ -466,6 +477,10 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
466
477
|
# OidcProvider
|
|
467
478
|
PROVIDER_DASHBOARD = 'dashboard'
|
|
468
479
|
|
|
480
|
+
PROXMOX_TYPE_VM = 'qemu'
|
|
481
|
+
|
|
482
|
+
PROXMOX_TYPE_CONTAINER = 'lxc'
|
|
483
|
+
|
|
469
484
|
# PSAType
|
|
470
485
|
PSA_TYPE_GENERIC = 0
|
|
471
486
|
|
|
@@ -475,6 +490,18 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
475
490
|
# PSAType
|
|
476
491
|
PSA_TYPE_SYNCRO = 2
|
|
477
492
|
|
|
493
|
+
# PveBackupMethod
|
|
494
|
+
PVE_BACKUP_METHOD_STOP = 'stop'
|
|
495
|
+
|
|
496
|
+
# PveBackupMethod
|
|
497
|
+
PVE_BACKUP_METHOD_SUSPEND = 'suspend'
|
|
498
|
+
|
|
499
|
+
# PveBackupMethod
|
|
500
|
+
PVE_BACKUP_METHOD_SNAPSHOT = 'snapshot'
|
|
501
|
+
|
|
502
|
+
# PveBackupMethod
|
|
503
|
+
PVE_BACKUP_METHOD_DEFAULT = PVE_BACKUP_METHOD_SNAPSHOT
|
|
504
|
+
|
|
478
505
|
RELEASE_CODENAME = 'Voyager'
|
|
479
506
|
|
|
480
507
|
# RemoteServerType: Comet Server
|
|
@@ -619,7 +646,7 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
619
646
|
# RetentionRangeType: Uses Timestamp
|
|
620
647
|
RETENTIONRANGE_NEWER_THAN_X = 901
|
|
621
648
|
|
|
622
|
-
# RetentionRangeType: Uses Days, Weeks, Months
|
|
649
|
+
# RetentionRangeType: Uses Days, Weeks, Months, Years
|
|
623
650
|
RETENTIONRANGE_JOBS_SINCE = 902
|
|
624
651
|
|
|
625
652
|
# RetentionRangeType: Uses Days
|
|
@@ -644,11 +671,19 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
644
671
|
# RetentionRangeType: Uses Jobs
|
|
645
672
|
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_MONTH = 909
|
|
646
673
|
|
|
674
|
+
# RetentionRangeType: Uses Jobs
|
|
675
|
+
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_YEAR = 910
|
|
676
|
+
|
|
677
|
+
# RetentionRangeType: Uses Years, YearOffset
|
|
678
|
+
RETENTIONRANGE_FIRST_JOB_FOR_LAST_X_YEARS = 911
|
|
679
|
+
|
|
647
680
|
# RetentionRangeType
|
|
648
|
-
RETENTIONRANGE__HIGHEST =
|
|
681
|
+
RETENTIONRANGE__HIGHEST = 911
|
|
649
682
|
|
|
650
683
|
RETENTIONRANGE_MAXINT = 1_125_899_906_842_624
|
|
651
684
|
|
|
685
|
+
ROTATE_STORAGE_VAULT_KEYS_DEFAULT = 48
|
|
686
|
+
|
|
652
687
|
SCHEDULE_FREQUENCY_LOWEST = 8010
|
|
653
688
|
|
|
654
689
|
# SecondsPast should be a Unix timestamp, in seconds
|
|
@@ -669,7 +704,10 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
669
704
|
# SecondsPast is the number of seconds per period. Offset: Shunt seconds after unix epoch
|
|
670
705
|
SCHEDULE_FREQUENCY_PERIODIC = 8015
|
|
671
706
|
|
|
672
|
-
|
|
707
|
+
# SecondsPast is the number of seconds past 00:00 1st, in the device's local timezone.
|
|
708
|
+
SCHEDULE_FREQUENCY_YEARLY = 8016
|
|
709
|
+
|
|
710
|
+
SCHEDULE_FREQUENCY_HIGHEST = 8016
|
|
673
711
|
|
|
674
712
|
# Maximum random delay (5 hours)
|
|
675
713
|
SCHEDULE_MAX_RANDOM_DELAY_SECS = 18_000
|
|
@@ -1021,6 +1059,9 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
1021
1059
|
# StoredObjectType
|
|
1022
1060
|
STOREDOBJECTTYPE_VMDK_SYMLINK = 'vmdksymlink'
|
|
1023
1061
|
|
|
1062
|
+
# StoredObjectType
|
|
1063
|
+
STOREDOBJECTTYPE_VMDK_WINDEDUP = 'vmdkwindedup'
|
|
1064
|
+
|
|
1024
1065
|
# StoredObjectType
|
|
1025
1066
|
STOREDOBJECTTYPE_VIRTUALIMAGE_DISK = 'virtualimagedisk'
|
|
1026
1067
|
|
|
@@ -1143,4 +1184,7 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
|
1143
1184
|
# WindowsCodesignMethod: Use a configured Azure Key Vault for Authenticode codesigning
|
|
1144
1185
|
WINDOWSCODESIGN_METHOD_AZUREKEYVAULT = 4
|
|
1145
1186
|
|
|
1187
|
+
# WindowsCodesignMethod: Use a configured SAS Relic server for Authenticode codesigning
|
|
1188
|
+
WINDOWSCODESIGN_METHOD_RELICSERVER = 5
|
|
1189
|
+
|
|
1146
1190
|
end
|
|
@@ -50,6 +50,10 @@ module Comet
|
|
|
50
50
|
# @type [String] log_level
|
|
51
51
|
attr_accessor :log_level
|
|
52
52
|
|
|
53
|
+
# Default disabled
|
|
54
|
+
# @type [String] tags
|
|
55
|
+
attr_accessor :tags
|
|
56
|
+
|
|
53
57
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
54
58
|
attr_accessor :unknown_json_fields
|
|
55
59
|
|
|
@@ -63,6 +67,7 @@ module Comet
|
|
|
63
67
|
@auto_retention_level = 0
|
|
64
68
|
@concurrency_count = 0
|
|
65
69
|
@log_level = ''
|
|
70
|
+
@tags = ''
|
|
66
71
|
@unknown_json_fields = {}
|
|
67
72
|
end
|
|
68
73
|
|
|
@@ -107,6 +112,10 @@ module Comet
|
|
|
107
112
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
108
113
|
|
|
109
114
|
@log_level = v
|
|
115
|
+
when 'Tags'
|
|
116
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
117
|
+
|
|
118
|
+
@tags = v
|
|
110
119
|
else
|
|
111
120
|
@unknown_json_fields[k] = v
|
|
112
121
|
end
|
|
@@ -125,6 +134,7 @@ module Comet
|
|
|
125
134
|
ret['AutoRetentionLevel'] = @auto_retention_level
|
|
126
135
|
ret['ConcurrencyCount'] = @concurrency_count
|
|
127
136
|
ret['LogLevel'] = @log_level
|
|
137
|
+
ret['Tags'] = @tags
|
|
128
138
|
@unknown_json_fields.each do |k, v|
|
|
129
139
|
ret[k] = v
|
|
130
140
|
end
|
|
@@ -122,6 +122,10 @@ module Comet
|
|
|
122
122
|
# @type [Comet::SizeMeasurement] destination_size_end
|
|
123
123
|
attr_accessor :destination_size_end
|
|
124
124
|
|
|
125
|
+
# The tags sent as BackupJobOptions, Useful for Groupings
|
|
126
|
+
# @type [String] tags
|
|
127
|
+
attr_accessor :tags
|
|
128
|
+
|
|
125
129
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
|
126
130
|
attr_accessor :unknown_json_fields
|
|
127
131
|
|
|
@@ -160,6 +164,7 @@ module Comet
|
|
|
160
164
|
@progress = Comet::BackupJobProgress.new
|
|
161
165
|
@destination_size_start = Comet::SizeMeasurement.new
|
|
162
166
|
@destination_size_end = Comet::SizeMeasurement.new
|
|
167
|
+
@tags = ''
|
|
163
168
|
@unknown_json_fields = {}
|
|
164
169
|
end
|
|
165
170
|
|
|
@@ -293,6 +298,10 @@ module Comet
|
|
|
293
298
|
when 'DestinationSizeEnd'
|
|
294
299
|
@destination_size_end = Comet::SizeMeasurement.new
|
|
295
300
|
@destination_size_end.from_hash(v)
|
|
301
|
+
when 'Tags'
|
|
302
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
|
303
|
+
|
|
304
|
+
@tags = v
|
|
296
305
|
else
|
|
297
306
|
@unknown_json_fields[k] = v
|
|
298
307
|
end
|
|
@@ -358,6 +367,9 @@ module Comet
|
|
|
358
367
|
unless @destination_size_end.nil?
|
|
359
368
|
ret['DestinationSizeEnd'] = @destination_size_end
|
|
360
369
|
end
|
|
370
|
+
unless @tags.nil?
|
|
371
|
+
ret['Tags'] = @tags
|
|
372
|
+
end
|
|
361
373
|
@unknown_json_fields.each do |k, v|
|
|
362
374
|
ret[k] = v
|
|
363
375
|
end
|