comet_backup_ruby_sdk 2.40.0 → 2.42.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 +11 -0
- data/Gemfile.lock +1 -1
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +264 -6
- data/lib/comet/definitions.rb +45 -7
- data/lib/comet/models/admin_options.rb +72 -0
- data/lib/comet/models/backup_job_detail.rb +12 -0
- data/lib/comet/models/block_info.rb +82 -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/browse_vmware_datacenters_response.rb +100 -0
- data/lib/comet/models/browse_vmware_datastores_response.rb +100 -0
- data/lib/comet/models/browse_vmware_hosts_response.rb +100 -0
- data/lib/comet/models/browse_vmware_networks_response.rb +100 -0
- data/lib/comet/models/browse_vmware_response.rb +2 -0
- data/lib/comet/models/disk_drive.rb +16 -0
- data/lib/comet/models/dispatcher_list_snapshot_virtual_machines_response.rb +99 -0
- data/lib/comet/models/external_authentication_source.rb +3 -3
- data/lib/comet/models/hyper_vmachine_info.rb +57 -0
- data/lib/comet/models/hyper_vrestore_target_options.rb +73 -0
- data/lib/comet/models/office_365custom_setting_v2.rb +64 -6
- data/lib/comet/models/office_365mixed_virtual_account.rb +8 -8
- data/lib/comet/models/partition.rb +20 -0
- data/lib/comet/models/partition_conflict.rb +91 -0
- data/lib/comet/models/policy_options.rb +80 -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 +86 -0
- data/lib/comet/models/pvebackup_node.rb +100 -0
- data/lib/comet/models/pvebackup_vm.rb +122 -0
- data/lib/comet/models/pvedisk.rb +137 -0
- data/lib/comet/models/pveparams.rb +138 -0
- data/lib/comet/models/pverestore_selection.rb +94 -0
- data/lib/comet/models/pvestorage_name.rb +83 -0
- data/lib/comet/models/pvevm.rb +148 -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 +35 -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/user_policy.rb +11 -0
- data/lib/comet/models/vmdisk_info.rb +105 -0
- data/lib/comet/models/vminfo.rb +137 -0
- data/lib/comet/models/vminfo_list.rb +80 -0
- data/lib/comet/models/vmware_datacenter_info.rb +74 -0
- data/lib/comet/models/vmware_datastore_info.rb +74 -0
- data/lib/comet/models/vmware_host_info.rb +74 -0
- data/lib/comet/models/vmware_machine_info.rb +1 -0
- data/lib/comet/models/vmware_network_info.rb +74 -0
- data/lib/comet/models/vmware_restore_target_options.rb +119 -0
- data/lib/comet_backup_ruby_sdk.rb +33 -0
- metadata +33 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1ce12d259b4709b8f945a3ab03c5aaa3affa2bf686d8db13a579efa734352ca
|
4
|
+
data.tar.gz: dccfbf9c48da859196a0ea45fd546e48869c696860b19b9e0e17275a9ad00ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca9afca76f9b80e1f66e22c05bacd2615be2f644f8b3d6db2caf5eb8f25736bb2e4afa73648dd6eaae0985ec2a92626edbba4a523edc43a410733ae7c2ab7f17
|
7
|
+
data.tar.gz: 9e6c3ce78d176e8c37966a00e2a33e835da5ed4e32295223d8e4fb9a07530d4a593288732b2a2c714690948ea3a3c4d5f7bf13455abce00ed2f791766e0cd825
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2025-08-15 v2.42.0
|
4
|
+
|
5
|
+
- Based on Comet 25.6.8
|
6
|
+
- Add support for Proxmox
|
7
|
+
- Add profile hash to some API endpoints
|
8
|
+
|
9
|
+
## 2025-02-17 v2.41.0
|
10
|
+
Update to 24.12.5
|
11
|
+
|
12
|
+
- Based on Comet 24.12.5
|
13
|
+
|
3
14
|
## 2025-01-29 v2.40.0
|
4
15
|
|
5
16
|
- Based on Comet 24.12.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.42.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -1143,6 +1143,37 @@ module Comet
|
|
1143
1143
|
ret
|
1144
1144
|
end
|
1145
1145
|
|
1146
|
+
# AdminDispatcherBrowseVirtualMachines
|
1147
|
+
#
|
1148
|
+
# Browse virtual machines in target snapshot.
|
1149
|
+
#
|
1150
|
+
# You must supply administrator authentication credentials to use this API.
|
1151
|
+
# This API requires the Auth Role to be enabled.
|
1152
|
+
#
|
1153
|
+
# @param [String] target_id The live connection GUID
|
1154
|
+
# @param [String] destination_id The Storage Vault GUID
|
1155
|
+
# @param [String] snapshot_id Snapshot to search
|
1156
|
+
# @return [Comet::DispatcherListSnapshotVirtualMachinesResponse]
|
1157
|
+
def admin_dispatcher_browse_virtual_machines(target_id, destination_id, snapshot_id)
|
1158
|
+
submit_params = {}
|
1159
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1160
|
+
|
1161
|
+
submit_params['TargetID'] = target_id
|
1162
|
+
raise TypeError, "'destination_id' expected String, got #{destination_id.class}" unless destination_id.is_a? String
|
1163
|
+
|
1164
|
+
submit_params['DestinationID'] = destination_id
|
1165
|
+
raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
1166
|
+
|
1167
|
+
submit_params['SnapshotID'] = snapshot_id
|
1168
|
+
|
1169
|
+
body = perform_request('api/v1/admin/dispatcher/browse-virtual-machines', submit_params)
|
1170
|
+
json_body = JSON.parse body
|
1171
|
+
check_status json_body
|
1172
|
+
ret = Comet::DispatcherListSnapshotVirtualMachinesResponse.new
|
1173
|
+
ret.from_hash(json_body)
|
1174
|
+
ret
|
1175
|
+
end
|
1176
|
+
|
1146
1177
|
# AdminDispatcherDeepverifyStorageVault
|
1147
1178
|
#
|
1148
1179
|
# Instruct a live connected device to deeply verify Storage Vault content.
|
@@ -1718,6 +1749,87 @@ module Comet
|
|
1718
1749
|
ret
|
1719
1750
|
end
|
1720
1751
|
|
1752
|
+
# AdminDispatcherRequestBrowseProxmox
|
1753
|
+
#
|
1754
|
+
# Request a list of Proxmox virtual machines and containers.
|
1755
|
+
#
|
1756
|
+
# You must supply administrator authentication credentials to use this API.
|
1757
|
+
# This API requires the Auth Role to be enabled.
|
1758
|
+
#
|
1759
|
+
# @param [String] target_id The live connection GUID
|
1760
|
+
# @param [Comet::ProxmoxConnection] credentials The Proxmox connection settings
|
1761
|
+
# @return [Comet::BrowseProxmoxResponse]
|
1762
|
+
def admin_dispatcher_request_browse_proxmox(target_id, credentials)
|
1763
|
+
submit_params = {}
|
1764
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1765
|
+
|
1766
|
+
submit_params['TargetID'] = target_id
|
1767
|
+
raise TypeError, "'credentials' expected Comet::ProxmoxConnection, got #{credentials.class}" unless credentials.is_a? Comet::ProxmoxConnection
|
1768
|
+
|
1769
|
+
submit_params['Credentials'] = credentials.to_json
|
1770
|
+
|
1771
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox', submit_params)
|
1772
|
+
json_body = JSON.parse body
|
1773
|
+
check_status json_body
|
1774
|
+
ret = Comet::BrowseProxmoxResponse.new
|
1775
|
+
ret.from_hash(json_body)
|
1776
|
+
ret
|
1777
|
+
end
|
1778
|
+
|
1779
|
+
# AdminDispatcherRequestBrowseProxmoxNodes
|
1780
|
+
#
|
1781
|
+
# Request a list of Proxmox nodes.
|
1782
|
+
#
|
1783
|
+
# You must supply administrator authentication credentials to use this API.
|
1784
|
+
# This API requires the Auth Role to be enabled.
|
1785
|
+
#
|
1786
|
+
# @param [String] target_id The live connection GUID
|
1787
|
+
# @param [Comet::SSHConnection] credentials The SSH connection settings
|
1788
|
+
# @return [Comet::BrowseProxmoxNodesResponse]
|
1789
|
+
def admin_dispatcher_request_browse_proxmox_nodes(target_id, credentials)
|
1790
|
+
submit_params = {}
|
1791
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1792
|
+
|
1793
|
+
submit_params['TargetID'] = target_id
|
1794
|
+
raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection
|
1795
|
+
|
1796
|
+
submit_params['Credentials'] = credentials.to_json
|
1797
|
+
|
1798
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/nodes', submit_params)
|
1799
|
+
json_body = JSON.parse body
|
1800
|
+
check_status json_body
|
1801
|
+
ret = Comet::BrowseProxmoxNodesResponse.new
|
1802
|
+
ret.from_hash(json_body)
|
1803
|
+
ret
|
1804
|
+
end
|
1805
|
+
|
1806
|
+
# AdminDispatcherRequestBrowseProxmoxStorage
|
1807
|
+
#
|
1808
|
+
# Request a list of configured Proxmox storage.
|
1809
|
+
#
|
1810
|
+
# You must supply administrator authentication credentials to use this API.
|
1811
|
+
# This API requires the Auth Role to be enabled.
|
1812
|
+
#
|
1813
|
+
# @param [String] target_id The live connection GUID
|
1814
|
+
# @param [Comet::SSHConnection] credentials The SSH connection settings
|
1815
|
+
# @return [Comet::BrowseProxmoxStorageResponse]
|
1816
|
+
def admin_dispatcher_request_browse_proxmox_storage(target_id, credentials)
|
1817
|
+
submit_params = {}
|
1818
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1819
|
+
|
1820
|
+
submit_params['TargetID'] = target_id
|
1821
|
+
raise TypeError, "'credentials' expected Comet::SSHConnection, got #{credentials.class}" unless credentials.is_a? Comet::SSHConnection
|
1822
|
+
|
1823
|
+
submit_params['Credentials'] = credentials.to_json
|
1824
|
+
|
1825
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-proxmox/storage', submit_params)
|
1826
|
+
json_body = JSON.parse body
|
1827
|
+
check_status json_body
|
1828
|
+
ret = Comet::BrowseProxmoxStorageResponse.new
|
1829
|
+
ret.from_hash(json_body)
|
1830
|
+
ret
|
1831
|
+
end
|
1832
|
+
|
1721
1833
|
# AdminDispatcherRequestBrowseVmware
|
1722
1834
|
#
|
1723
1835
|
# Request a list of VMware vSphere virtual machines.
|
@@ -1746,6 +1858,130 @@ module Comet
|
|
1746
1858
|
ret
|
1747
1859
|
end
|
1748
1860
|
|
1861
|
+
# AdminDispatcherRequestBrowseVmwareDatacenters
|
1862
|
+
#
|
1863
|
+
# Request a list of VMware vSphere Datacenters on a VMware vSphere connection.
|
1864
|
+
# The remote device must have given consent for an MSP to browse their files.
|
1865
|
+
#
|
1866
|
+
# You must supply administrator authentication credentials to use this API.
|
1867
|
+
# This API requires the Auth Role to be enabled.
|
1868
|
+
#
|
1869
|
+
# @param [String] target_id The live connection GUID
|
1870
|
+
# @param [Comet::VMwareConnection] credentials The VMware vSphere connection settings
|
1871
|
+
# @return [Comet::BrowseVMwareDatacentersResponse]
|
1872
|
+
def admin_dispatcher_request_browse_vmware_datacenters(target_id, credentials)
|
1873
|
+
submit_params = {}
|
1874
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1875
|
+
|
1876
|
+
submit_params['TargetID'] = target_id
|
1877
|
+
raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection
|
1878
|
+
|
1879
|
+
submit_params['Credentials'] = credentials.to_json
|
1880
|
+
|
1881
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/datacenters', submit_params)
|
1882
|
+
json_body = JSON.parse body
|
1883
|
+
check_status json_body
|
1884
|
+
ret = Comet::BrowseVMwareDatacentersResponse.new
|
1885
|
+
ret.from_hash(json_body)
|
1886
|
+
ret
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
# AdminDispatcherRequestBrowseVmwareDatastores
|
1890
|
+
#
|
1891
|
+
# Request a list of VMware vSphere Datastores on a VMware vSphere connection, for a specified VMware Datacenter.
|
1892
|
+
# The remote device must have given consent for an MSP to browse their files.
|
1893
|
+
#
|
1894
|
+
# You must supply administrator authentication credentials to use this API.
|
1895
|
+
# This API requires the Auth Role to be enabled.
|
1896
|
+
#
|
1897
|
+
# @param [String] target_id The live connection GUID
|
1898
|
+
# @param [Comet::VMwareConnection] credentials The VMware vSphere connection settings
|
1899
|
+
# @param [String] filter The name of the target VMware Datacenter
|
1900
|
+
# @return [Comet::BrowseVMwareDatastoresResponse]
|
1901
|
+
def admin_dispatcher_request_browse_vmware_datastores(target_id, credentials, filter)
|
1902
|
+
submit_params = {}
|
1903
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1904
|
+
|
1905
|
+
submit_params['TargetID'] = target_id
|
1906
|
+
raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection
|
1907
|
+
|
1908
|
+
submit_params['Credentials'] = credentials.to_json
|
1909
|
+
raise TypeError, "'filter' expected String, got #{filter.class}" unless filter.is_a? String
|
1910
|
+
|
1911
|
+
submit_params['Filter'] = filter
|
1912
|
+
|
1913
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/datastores', submit_params)
|
1914
|
+
json_body = JSON.parse body
|
1915
|
+
check_status json_body
|
1916
|
+
ret = Comet::BrowseVMwareDatastoresResponse.new
|
1917
|
+
ret.from_hash(json_body)
|
1918
|
+
ret
|
1919
|
+
end
|
1920
|
+
|
1921
|
+
# AdminDispatcherRequestBrowseVmwareHosts
|
1922
|
+
#
|
1923
|
+
# Request a list of VMware vSphere Hosts on a VMware vSphere connection, for a specified VMware Datacenter.
|
1924
|
+
# The remote device must have given consent for an MSP to browse their files.
|
1925
|
+
#
|
1926
|
+
# You must supply administrator authentication credentials to use this API.
|
1927
|
+
# This API requires the Auth Role to be enabled.
|
1928
|
+
#
|
1929
|
+
# @param [String] target_id The live connection GUID
|
1930
|
+
# @param [Comet::VMwareConnection] credentials The VMware vSphere connection settings
|
1931
|
+
# @param [String] filter The name of the target VMware Datacenter
|
1932
|
+
# @return [Comet::BrowseVMwareHostsResponse]
|
1933
|
+
def admin_dispatcher_request_browse_vmware_hosts(target_id, credentials, filter)
|
1934
|
+
submit_params = {}
|
1935
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1936
|
+
|
1937
|
+
submit_params['TargetID'] = target_id
|
1938
|
+
raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection
|
1939
|
+
|
1940
|
+
submit_params['Credentials'] = credentials.to_json
|
1941
|
+
raise TypeError, "'filter' expected String, got #{filter.class}" unless filter.is_a? String
|
1942
|
+
|
1943
|
+
submit_params['Filter'] = filter
|
1944
|
+
|
1945
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/hosts', submit_params)
|
1946
|
+
json_body = JSON.parse body
|
1947
|
+
check_status json_body
|
1948
|
+
ret = Comet::BrowseVMwareHostsResponse.new
|
1949
|
+
ret.from_hash(json_body)
|
1950
|
+
ret
|
1951
|
+
end
|
1952
|
+
|
1953
|
+
# AdminDispatcherRequestBrowseVmwareNetworks
|
1954
|
+
#
|
1955
|
+
# Request a list of VMware vSphere Networks on a VMware vSphere connection, for a specified VMware Datacenter.
|
1956
|
+
# The remote device must have given consent for an MSP to browse their files.
|
1957
|
+
#
|
1958
|
+
# You must supply administrator authentication credentials to use this API.
|
1959
|
+
# This API requires the Auth Role to be enabled.
|
1960
|
+
#
|
1961
|
+
# @param [String] target_id The live connection GUID
|
1962
|
+
# @param [Comet::VMwareConnection] credentials The VMware vSphere connection settings
|
1963
|
+
# @param [String] filter The name of the target VMware Datacenter
|
1964
|
+
# @return [Comet::BrowseVMwareNetworksResponse]
|
1965
|
+
def admin_dispatcher_request_browse_vmware_networks(target_id, credentials, filter)
|
1966
|
+
submit_params = {}
|
1967
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1968
|
+
|
1969
|
+
submit_params['TargetID'] = target_id
|
1970
|
+
raise TypeError, "'credentials' expected Comet::VMwareConnection, got #{credentials.class}" unless credentials.is_a? Comet::VMwareConnection
|
1971
|
+
|
1972
|
+
submit_params['Credentials'] = credentials.to_json
|
1973
|
+
raise TypeError, "'filter' expected String, got #{filter.class}" unless filter.is_a? String
|
1974
|
+
|
1975
|
+
submit_params['Filter'] = filter
|
1976
|
+
|
1977
|
+
body = perform_request('api/v1/admin/dispatcher/request-browse-vmware/networks', submit_params)
|
1978
|
+
json_body = JSON.parse body
|
1979
|
+
check_status json_body
|
1980
|
+
ret = Comet::BrowseVMwareNetworksResponse.new
|
1981
|
+
ret.from_hash(json_body)
|
1982
|
+
ret
|
1983
|
+
end
|
1984
|
+
|
1749
1985
|
# AdminDispatcherRequestBrowseVssAaw
|
1750
1986
|
#
|
1751
1987
|
# Request a list of installed VSS Writers (Application-Aware Writers) from a live connected device.
|
@@ -2258,8 +2494,9 @@ module Comet
|
|
2258
2494
|
#
|
2259
2495
|
# @param [String] target_id The live connection GUID
|
2260
2496
|
# @param [String] destination The Storage Vault GUID
|
2497
|
+
# @param [Boolean] allow_unsafe (Optional) Allow legacy Storage Vault unlocking, which is unsafe in some cases.
|
2261
2498
|
# @return [Comet::CometAPIResponseMessage]
|
2262
|
-
def admin_dispatcher_unlock(target_id, destination)
|
2499
|
+
def admin_dispatcher_unlock(target_id, destination, allow_unsafe = nil)
|
2263
2500
|
submit_params = {}
|
2264
2501
|
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
2265
2502
|
|
@@ -2267,6 +2504,9 @@ module Comet
|
|
2267
2504
|
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
2268
2505
|
|
2269
2506
|
submit_params['Destination'] = destination
|
2507
|
+
unless allow_unsafe.nil?
|
2508
|
+
submit_params['AllowUnsafe'] = (allow_unsafe ? 1 : 0)
|
2509
|
+
end
|
2270
2510
|
|
2271
2511
|
body = perform_request('api/v1/admin/dispatcher/unlock', submit_params)
|
2272
2512
|
json_body = JSON.parse body
|
@@ -3976,8 +4216,9 @@ module Comet
|
|
3976
4216
|
# @param [String] policy_id The policy ID to update or create
|
3977
4217
|
# @param [Comet::GroupPolicy] policy The policy data
|
3978
4218
|
# @param [String] check_policy_hash (Optional) An atomic verification hash as supplied by the AdminPoliciesGet API
|
4219
|
+
# @param [Comet::PolicyOptions] options (Optional) An array of PolicySourceID that will be explicitly deleted.
|
3979
4220
|
# @return [Comet::CometAPIResponseMessage]
|
3980
|
-
def admin_policies_set(policy_id, policy, check_policy_hash = nil)
|
4221
|
+
def admin_policies_set(policy_id, policy, check_policy_hash = nil, options = nil)
|
3981
4222
|
submit_params = {}
|
3982
4223
|
raise TypeError, "'policy_id' expected String, got #{policy_id.class}" unless policy_id.is_a? String
|
3983
4224
|
|
@@ -3990,6 +4231,11 @@ module Comet
|
|
3990
4231
|
|
3991
4232
|
submit_params['CheckPolicyHash'] = check_policy_hash
|
3992
4233
|
end
|
4234
|
+
unless options.nil?
|
4235
|
+
raise TypeError, "'options' expected Comet::PolicyOptions, got #{options.class}" unless options.is_a? Comet::PolicyOptions
|
4236
|
+
|
4237
|
+
submit_params['Options'] = options.to_json
|
4238
|
+
end
|
3993
4239
|
|
3994
4240
|
body = perform_request('api/v1/admin/policies/set', submit_params)
|
3995
4241
|
json_body = JSON.parse body
|
@@ -4070,8 +4316,9 @@ module Comet
|
|
4070
4316
|
# @param [String] storage_provider ID for the storage template destination
|
4071
4317
|
# @param [String] self_address (Optional) The external URL for this server. Used to resolve conflicts
|
4072
4318
|
# @param [String] device_id (Optional) The ID of the device to be added as a associated device of the Storage Vault
|
4319
|
+
# @param [String] profile_hash (Optional) The profile hash of the user profile
|
4073
4320
|
# @return [Comet::RequestStorageVaultResponseMessage]
|
4074
|
-
def admin_request_storage_vault(target_user, storage_provider, self_address = nil, device_id = nil)
|
4321
|
+
def admin_request_storage_vault(target_user, storage_provider, self_address = nil, device_id = nil, profile_hash = nil)
|
4075
4322
|
submit_params = {}
|
4076
4323
|
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
4077
4324
|
|
@@ -4091,6 +4338,11 @@ module Comet
|
|
4091
4338
|
|
4092
4339
|
submit_params['DeviceID'] = device_id
|
4093
4340
|
end
|
4341
|
+
unless profile_hash.nil?
|
4342
|
+
raise TypeError, "'profile_hash' expected String, got #{profile_hash.class}" unless profile_hash.is_a? String
|
4343
|
+
|
4344
|
+
submit_params['ProfileHash'] = profile_hash
|
4345
|
+
end
|
4094
4346
|
|
4095
4347
|
body = perform_request('api/v1/admin/request-storage-vault', submit_params)
|
4096
4348
|
json_body = JSON.parse body
|
@@ -4251,8 +4503,9 @@ module Comet
|
|
4251
4503
|
# @param [String] target_user Selected account username
|
4252
4504
|
# @param [Comet::UserProfileConfig] profile_data Modified user profile
|
4253
4505
|
# @param [String] require_hash Previous hash parameter
|
4254
|
-
# @
|
4255
|
-
|
4506
|
+
# @param [Comet::AdminOptions] admin_options (Optional) Instructions for modifying user profile
|
4507
|
+
# @return [Comet::GetProfileAndHashResponseMessage]
|
4508
|
+
def admin_set_user_profile_hash(target_user, profile_data, require_hash, admin_options = nil)
|
4256
4509
|
submit_params = {}
|
4257
4510
|
raise TypeError, "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
|
4258
4511
|
|
@@ -4263,11 +4516,16 @@ module Comet
|
|
4263
4516
|
raise TypeError, "'require_hash' expected String, got #{require_hash.class}" unless require_hash.is_a? String
|
4264
4517
|
|
4265
4518
|
submit_params['RequireHash'] = require_hash
|
4519
|
+
unless admin_options.nil?
|
4520
|
+
raise TypeError, "'admin_options' expected Comet::AdminOptions, got #{admin_options.class}" unless admin_options.is_a? Comet::AdminOptions
|
4521
|
+
|
4522
|
+
submit_params['AdminOptions'] = admin_options.to_json
|
4523
|
+
end
|
4266
4524
|
|
4267
4525
|
body = perform_request('api/v1/admin/set-user-profile-hash', submit_params)
|
4268
4526
|
json_body = JSON.parse body
|
4269
4527
|
check_status json_body
|
4270
|
-
ret = Comet::
|
4528
|
+
ret = Comet::GetProfileAndHashResponseMessage.new
|
4271
4529
|
ret.from_hash(json_body)
|
4272
4530
|
ret
|
4273
4531
|
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.6.8'
|
11
11
|
|
12
|
-
APPLICATION_VERSION_MAJOR =
|
12
|
+
APPLICATION_VERSION_MAJOR = 25
|
13
13
|
|
14
|
-
APPLICATION_VERSION_MINOR =
|
14
|
+
APPLICATION_VERSION_MINOR = 6
|
15
15
|
|
16
|
-
APPLICATION_VERSION_REVISION =
|
16
|
+
APPLICATION_VERSION_REVISION = 8
|
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
|
|
@@ -433,6 +439,8 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
433
439
|
|
434
440
|
OFFICE365_REGION_US_DOD = 'USGovtGccDoDCloud'
|
435
441
|
|
442
|
+
OFFICE365_REGION_PUBLIC_TEST = 'GlobalPublicCloudTest'
|
443
|
+
|
436
444
|
# ExtraFileExclusionOSRestriction: Applies to any device
|
437
445
|
OS_ANY = 0
|
438
446
|
|
@@ -466,6 +474,10 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
466
474
|
# OidcProvider
|
467
475
|
PROVIDER_DASHBOARD = 'dashboard'
|
468
476
|
|
477
|
+
PROXMOX_TYPE_VM = 'qemu'
|
478
|
+
|
479
|
+
PROXMOX_TYPE_CONTAINER = 'lxc'
|
480
|
+
|
469
481
|
# PSAType
|
470
482
|
PSA_TYPE_GENERIC = 0
|
471
483
|
|
@@ -475,6 +487,14 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
475
487
|
# PSAType
|
476
488
|
PSA_TYPE_SYNCRO = 2
|
477
489
|
|
490
|
+
PVE_BACKUP_METHOD_STOP = 'stop'
|
491
|
+
|
492
|
+
PVE_BACKUP_METHOD_SUSPEND = 'suspend'
|
493
|
+
|
494
|
+
PVE_BACKUP_METHOD_SNAPSHOT = 'snapshot'
|
495
|
+
|
496
|
+
PVE_BACKUP_METHOD_DEFAULT = PVE_BACKUP_METHOD_SNAPSHOT
|
497
|
+
|
478
498
|
RELEASE_CODENAME = 'Voyager'
|
479
499
|
|
480
500
|
# RemoteServerType: Comet Server
|
@@ -597,6 +617,10 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
597
617
|
# RestoreType: Restore disk image backup as Hyper-V-compatible virtual disks (.vhdx format)
|
598
618
|
RESTORETYPE_WINDISK_VHDX = 13
|
599
619
|
|
620
|
+
# RestoreType: Restore virtual machines directly to hypervisor
|
621
|
+
# This const is available in Comet 24.12.x and later.
|
622
|
+
RESTORETYPE_VMHOST = 14
|
623
|
+
|
600
624
|
# RestoreType: Legacy name alias - Prefer to use RESTORETYPE_PROCESS_ARCHIVE since multiple archive file formats are supported within this single RESTORETYPE_
|
601
625
|
RESTORETYPE_PROCESS_TARBALL = 3
|
602
626
|
|
@@ -615,7 +639,7 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
615
639
|
# RetentionRangeType: Uses Timestamp
|
616
640
|
RETENTIONRANGE_NEWER_THAN_X = 901
|
617
641
|
|
618
|
-
# RetentionRangeType: Uses Days, Weeks, Months
|
642
|
+
# RetentionRangeType: Uses Days, Weeks, Months, Years
|
619
643
|
RETENTIONRANGE_JOBS_SINCE = 902
|
620
644
|
|
621
645
|
# RetentionRangeType: Uses Days
|
@@ -640,11 +664,19 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
640
664
|
# RetentionRangeType: Uses Jobs
|
641
665
|
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_MONTH = 909
|
642
666
|
|
667
|
+
# RetentionRangeType: Uses Jobs
|
668
|
+
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_YEAR = 910
|
669
|
+
|
670
|
+
# RetentionRangeType: Uses Years, YearOffset
|
671
|
+
RETENTIONRANGE_FIRST_JOB_FOR_LAST_X_YEARS = 911
|
672
|
+
|
643
673
|
# RetentionRangeType
|
644
|
-
RETENTIONRANGE__HIGHEST =
|
674
|
+
RETENTIONRANGE__HIGHEST = 911
|
645
675
|
|
646
676
|
RETENTIONRANGE_MAXINT = 1_125_899_906_842_624
|
647
677
|
|
678
|
+
ROTATE_STORAGE_VAULT_KEYS_DEFAULT = 48
|
679
|
+
|
648
680
|
SCHEDULE_FREQUENCY_LOWEST = 8010
|
649
681
|
|
650
682
|
# SecondsPast should be a Unix timestamp, in seconds
|
@@ -665,7 +697,10 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
665
697
|
# SecondsPast is the number of seconds per period. Offset: Shunt seconds after unix epoch
|
666
698
|
SCHEDULE_FREQUENCY_PERIODIC = 8015
|
667
699
|
|
668
|
-
|
700
|
+
# SecondsPast is the number of seconds past 00:00 1st, in the device's local timezone.
|
701
|
+
SCHEDULE_FREQUENCY_YEARLY = 8016
|
702
|
+
|
703
|
+
SCHEDULE_FREQUENCY_HIGHEST = 8016
|
669
704
|
|
670
705
|
# Maximum random delay (5 hours)
|
671
706
|
SCHEDULE_MAX_RANDOM_DELAY_SECS = 18_000
|
@@ -1017,6 +1052,9 @@ New code should explicitly use OBJECT_LOCK_ON / OBJECT_LOCK_OFF instead.
|
|
1017
1052
|
# StoredObjectType
|
1018
1053
|
STOREDOBJECTTYPE_VMDK_SYMLINK = 'vmdksymlink'
|
1019
1054
|
|
1055
|
+
# StoredObjectType
|
1056
|
+
STOREDOBJECTTYPE_VMDK_WINDEDUP = 'vmdkwindedup'
|
1057
|
+
|
1020
1058
|
# StoredObjectType
|
1021
1059
|
STOREDOBJECTTYPE_VIRTUALIMAGE_DISK = 'virtualimagedisk'
|
1022
1060
|
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-2025 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
|
+
# AdminOptions is a typed class wrapper around the underlying Comet Server API data structure.
|
13
|
+
class AdminOptions
|
14
|
+
|
15
|
+
# @type [Comet::PolicyOptions] policy
|
16
|
+
attr_accessor :policy
|
17
|
+
|
18
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
19
|
+
attr_accessor :unknown_json_fields
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
clear
|
23
|
+
end
|
24
|
+
|
25
|
+
def clear
|
26
|
+
@policy = Comet::PolicyOptions.new
|
27
|
+
@unknown_json_fields = {}
|
28
|
+
end
|
29
|
+
|
30
|
+
# @param [String] json_string The complete object in JSON format
|
31
|
+
def from_json(json_string)
|
32
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
33
|
+
|
34
|
+
from_hash(JSON.parse(json_string))
|
35
|
+
end
|
36
|
+
|
37
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
38
|
+
def from_hash(obj)
|
39
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
40
|
+
|
41
|
+
obj.each do |k, v|
|
42
|
+
case k
|
43
|
+
when 'Policy'
|
44
|
+
@policy = Comet::PolicyOptions.new
|
45
|
+
@policy.from_hash(v)
|
46
|
+
else
|
47
|
+
@unknown_json_fields[k] = v
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# @return [Hash] The complete object as a Ruby hash
|
53
|
+
def to_hash
|
54
|
+
ret = {}
|
55
|
+
ret['Policy'] = @policy
|
56
|
+
@unknown_json_fields.each do |k, v|
|
57
|
+
ret[k] = v
|
58
|
+
end
|
59
|
+
ret
|
60
|
+
end
|
61
|
+
|
62
|
+
# @return [Hash] The complete object as a Ruby hash
|
63
|
+
def to_h
|
64
|
+
to_hash
|
65
|
+
end
|
66
|
+
|
67
|
+
# @return [String] The complete object as a JSON string
|
68
|
+
def to_json(options = {})
|
69
|
+
to_hash.to_json(options)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -99,6 +99,10 @@ module Comet
|
|
99
99
|
# @type [Number] total_unlicensed_mails_count
|
100
100
|
attr_accessor :total_unlicensed_mails_count
|
101
101
|
|
102
|
+
# The CRC32 of the billing data for this job.
|
103
|
+
# @type [Number] billing_crc_32
|
104
|
+
attr_accessor :billing_crc_32
|
105
|
+
|
102
106
|
# If this field is present, this job did not perform some work because the Storage Vault is
|
103
107
|
# currently busy.
|
104
108
|
# This field is available in Comet 24.9.2 and later.
|
@@ -155,6 +159,7 @@ module Comet
|
|
155
159
|
@total_accounts_count = 0
|
156
160
|
@total_licensed_mails_count = 0
|
157
161
|
@total_unlicensed_mails_count = 0
|
162
|
+
@billing_crc_32 = 0
|
158
163
|
@conflicting_job_id = ''
|
159
164
|
@cancellation_id = ''
|
160
165
|
@progress = Comet::BackupJobProgress.new
|
@@ -276,6 +281,10 @@ module Comet
|
|
276
281
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
277
282
|
|
278
283
|
@total_unlicensed_mails_count = v
|
284
|
+
when 'BillingCrc32'
|
285
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
286
|
+
|
287
|
+
@billing_crc_32 = v
|
279
288
|
when 'ConflictingJobID'
|
280
289
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
281
290
|
|
@@ -343,6 +352,9 @@ module Comet
|
|
343
352
|
unless @total_unlicensed_mails_count.nil?
|
344
353
|
ret['TotalUnlicensedMailsCount'] = @total_unlicensed_mails_count
|
345
354
|
end
|
355
|
+
unless @billing_crc_32.nil?
|
356
|
+
ret['BillingCrc32'] = @billing_crc_32
|
357
|
+
end
|
346
358
|
unless @conflicting_job_id.nil?
|
347
359
|
ret['ConflictingJobID'] = @conflicting_job_id
|
348
360
|
end
|