Skip to content

Commit 6748208

Browse files
committed
CLOUDSTACK-10102: Improvements
1 parent 405ca44 commit 6748208

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ private void recreateUserVmSeach(NetworkVO network) {
313313
SearchBuilder<NicVO> nicSearch = _nicDao.createSearchBuilder();
314314
nicSearch.and("networkId", nicSearch.entity().getNetworkId(), SearchCriteria.Op.EQ);
315315
nicSearch.and("removed", nicSearch.entity().getRemoved(), SearchCriteria.Op.NULL);
316-
if (!network.getGuestType().equals(Network.GuestType.L2)) {
316+
if (!Network.GuestType.L2.equals(network.getGuestType())) {
317317
nicSearch.and().op("ip4Address", nicSearch.entity().getIPv4Address(), SearchCriteria.Op.NNULL);
318318
nicSearch.or("ip6Address", nicSearch.entity().getIPv6Address(), SearchCriteria.Op.NNULL);
319319
nicSearch.cp();

server/src/com/cloud/network/NetworkModelImpl.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,7 @@
2121
import java.security.InvalidParameterException;
2222
import java.security.MessageDigest;
2323
import java.security.NoSuchAlgorithmException;
24-
import java.util.ArrayList;
25-
import java.util.HashMap;
26-
import java.util.HashSet;
27-
import java.util.Iterator;
28-
import java.util.List;
29-
import java.util.Map;
30-
import java.util.Set;
31-
import java.util.TreeSet;
24+
import java.util.*;
3225

3326
import javax.inject.Inject;
3427
import javax.naming.ConfigurationException;
@@ -1827,7 +1820,7 @@ public boolean isNetworkAvailableInDomain(long networkId, long domainId) {
18271820
@Override
18281821
public Set<Long> getAvailableIps(Network network, String requestedIp) {
18291822
if (network.getCidr() == null) {
1830-
return null;
1823+
return Collections.emptySet();
18311824
}
18321825
String[] cidr = network.getCidr().split("/");
18331826
List<String> ips = getUsedIpsInNetwork(network);

0 commit comments

Comments
 (0)