如何使用 pyVmomi 获取 vSAN 集群的重复数据删除和数据压缩状态?
How to get data deduplication and data compression status for vSAN cluster using pyVmomi?
我想获取 vSAN 集群的重复数据删除和数据压缩状态,以便 运行 预检查磁盘格式版本升级。
def get_compression_deduplication_status(si, cluster_ref):
vcMos = vsanapiutils.GetVsanVcMos(si._stub, context=context)
vsanClusterSystem = vcMos['vsan-cluster-config-system']
vsan_config_info = vsanClusterSystem.GetConfigInfoEx(cluster_ref)
dedupEnabled = vsan_config_info.dataEfficiencyConfig.dedupEnabled
compressionEnabled = vsan_config_info.dataEfficiencyConfig.compressionEnabled
return {'dedupEnabled': bool(dedupEnabled), 'compressionEnabled': bool(compressionEnabled)}
我想获取 vSAN 集群的重复数据删除和数据压缩状态,以便 运行 预检查磁盘格式版本升级。
def get_compression_deduplication_status(si, cluster_ref):
vcMos = vsanapiutils.GetVsanVcMos(si._stub, context=context)
vsanClusterSystem = vcMos['vsan-cluster-config-system']
vsan_config_info = vsanClusterSystem.GetConfigInfoEx(cluster_ref)
dedupEnabled = vsan_config_info.dataEfficiencyConfig.dedupEnabled
compressionEnabled = vsan_config_info.dataEfficiencyConfig.compressionEnabled
return {'dedupEnabled': bool(dedupEnabled), 'compressionEnabled': bool(compressionEnabled)}