File tree Expand file tree Collapse file tree
api/src/main/java/com/cloud/agent/api/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,8 +148,14 @@ public List<DatadiskTO> getOVFVolumeInfo(final String ovfFilePath) {
148148 throw new CloudRuntimeException ("The ovf file info has incomplete disk info" );
149149 }
150150 Long capacity = cdisk == null ? of ._size : cdisk ._capacity ;
151- String controller = cdisk == null ? "" : cdisk ._controller ._name ;
152- String controllerSubType = cdisk == null ? "" : cdisk ._controller ._subType ;
151+ String controller = "" ;
152+ String controllerSubType = "" ;
153+ if (cdisk != null ) {
154+ OVFDiskController cDiskController = cdisk ._controller ;
155+ controller = cDiskController == null ? "" : cdisk ._controller ._name ;
156+ controllerSubType = cDiskController == null ? "" : cdisk ._controller ._subType ;
157+ }
158+
153159 String dataDiskPath = ovfFile .getParent () + File .separator + of ._href ;
154160 File f = new File (dataDiskPath );
155161 if (!f .exists () || f .isDirectory ()) {
You can’t perform that action at this time.
0 commit comments