Skip to content

Commit a3c2bb7

Browse files
committed
Merge branch 'master' into api_refactoring
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2 parents beb2fcc + 8f6fdc3 commit a3c2bb7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4333,8 +4333,13 @@ protected boolean getHostInfo(Connection conn) throws IllegalArgumentException{
43334333
}
43344334
XsLocalNetwork storageNic1 = null;
43354335
storageNic1 = getNetworkByName(conn, _storageNetworkName1);
4336-
_host.storageNetwork1 = storageNic1.getNetworkRecord(conn).uuid;
4337-
_host.storagePif1 = storageNic1.getPifRecord(conn).uuid;
4336+
if (storageNic1 == null) {
4337+
s_logger.warn("Unable to find storage network " + _storageNetworkName1 + " for host " + _host.ip);
4338+
throw new IllegalArgumentException("Unable to find storage network " + _storageNetworkName1 + " for host " + _host.ip);
4339+
} else {
4340+
_host.storageNetwork1 = storageNic1.getNetworkRecord(conn).uuid;
4341+
_host.storagePif1 = storageNic1.getPifRecord(conn).uuid;
4342+
}
43384343

43394344
XsLocalNetwork storageNic2 = null;
43404345
if (_storageNetworkName2 != null) {

0 commit comments

Comments
 (0)