Skip to content

Commit

Permalink
Update rvc-util.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
cwei44 authored Mar 24, 2022
1 parent df98097 commit 97f48ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rvc_rvc/lib/rvc/modules/vsantest/automation/lib/rvc-util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,10 @@ def _get_vsan_stats(datastore_name)
datastore_full_moid = _get_moid("ds",datastore_name).join(":")
vsan_info_json = JSON.parse(`govc datastore.vsan.info -json -dc "#{Shellwords.escape($dc_name)}" -m #{datastore_full_moid}`.chomp)
vsan_default_policy_id = vsan_info_json["DatastoreDefaultProfileId"][datastore_full_moid][0]
vsan_detail = JSON.parse(vsan_info_json["DatastoreDefaultProfileId"][datastore_full_moid][1])
vsan_detail = {}
if vsan_info_json["DatastoreDefaultProfileId"][datastore_full_moid][1] != ""
vsan_detail = JSON.parse(vsan_info_json["DatastoreDefaultProfileId"][datastore_full_moid][1])
end
vsan_cluster_name = vsan_info_json["DatastoreDefaultProfileId"][datastore_full_moid][2]
return vsan_default_policy_id, vsan_detail, vsan_cluster_name
end
Expand Down

0 comments on commit 97f48ed

Please sign in to comment.