File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -3772,6 +3772,8 @@ public StartupCommand[] initialize() {
37723772 cmd .getHostDetails ().put (HOST_INSTANCE_CONVERSION , String .valueOf (instanceConversionSupported ));
37733773 if (instanceConversionSupported ) {
37743774 cmd .getHostDetails ().put (HOST_VIRTV2V_VERSION , getHostVirtV2vVersion ());
3775+ }
3776+ if (hostSupportsOvfExport ()) {
37753777 cmd .getHostDetails ().put (HOST_OVFTOOL_VERSION , getHostOvfToolVersion ());
37763778 }
37773779 HealthCheckResult healthCheckResult = getHostHealthCheckResult ();
@@ -5376,11 +5378,18 @@ public boolean hostSupportsOvfExport() {
53765378 }
53775379
53785380 public String getHostVirtV2vVersion () {
5381+ if (!hostSupportsInstanceConversion ()) {
5382+ return "" ;
5383+ }
53795384 String cmd = String .format ("%s | awk '{print $2}'" , INSTANCE_CONVERSION_SUPPORTED_CHECK_CMD );
5380- return Script .runSimpleBashScript (cmd );
5385+ String version = Script .runSimpleBashScript (cmd );
5386+ return StringUtils .isNotBlank (version ) ? version .split ("," )[0 ] : "" ;
53815387 }
53825388
53835389 public String getHostOvfToolVersion () {
5390+ if (!hostSupportsOvfExport ()) {
5391+ return "" ;
5392+ }
53845393 return Script .runSimpleBashScript (OVF_EXPORT_TOOl_GET_VERSION_CMD );
53855394 }
53865395
Original file line number Diff line number Diff line change 10891089"label.host" : " IP address" ,
10901090"label.host.alerts" : " Hosts in alert state" ,
10911091"label.host.name" : " Host name" ,
1092+ "label.host.ovftool.version" : " OVFTool Version" ,
10921093"label.host.tag" : " Host tag" ,
1094+ "label.host.virtv2v.version" : " Virt-v2v Version" ,
10931095"label.hostcontrolstate" : " Compute Resource Status" ,
10941096"label.hostid" : " Host" ,
10951097"label.hostname" : " Host" ,
Original file line number Diff line number Diff line change 5656 </div >
5757 </div >
5858 </a-list-item >
59+ <a-list-item v-if =" host.details && host.details['host.virtv2v.version']" >
60+ <div >
61+ <strong >{{ $t('label.host.virtv2v.version') }}</strong >
62+ <div >
63+ {{ host.details['host.virtv2v.version'] }}
64+ </div >
65+ </div >
66+ </a-list-item >
67+ <a-list-item v-if =" host.details && host.details['host.ovftool.version']" >
68+ <div >
69+ <strong >{{ $t('label.host.ovftool.version') }}</strong >
70+ <div >
71+ {{ host.details['host.ovftool.version'] }}
72+ </div >
73+ </div >
74+ </a-list-item >
5975 <a-list-item v-if =" host.hosttags" >
6076 <div >
6177 <strong >{{ $t('label.hosttags') }}</strong >
You can’t perform that action at this time.
0 commit comments