mirror of https://github.com/apache/jclouds.git
Merge pull request #1014 from ahgittin/fix/cloudstack-niggles
fix cloudstack network NPE, and 2 logging cleanups
This commit is contained in:
commit
39bf8f9897
|
@ -175,7 +175,7 @@ public class CloudStackComputeServiceAdapter implements
|
|||
String templateId = template.getImage().getId();
|
||||
String serviceOfferingId = template.getHardware().getId();
|
||||
|
||||
logger.info("serviceOfferingId %s, templateId %s, zoneId %s, options %s%n", serviceOfferingId, templateId,
|
||||
logger.debug("serviceOfferingId %s, templateId %s, zoneId %s, options %s%n", serviceOfferingId, templateId,
|
||||
zoneId, options);
|
||||
AsyncCreateResponse job = client.getVirtualMachineClient().deployVirtualMachineInZone(zoneId, serviceOfferingId,
|
||||
templateId, options);
|
||||
|
|
|
@ -35,12 +35,12 @@ public class PublicIPAddressPredicates {
|
|||
private final String networkId;
|
||||
|
||||
public AssociatedWithNetwork(String networkId) {
|
||||
this.networkId = networkId;
|
||||
this.networkId = checkNotNull(networkId, "networkId");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(PublicIPAddress input) {
|
||||
return checkNotNull(input, "ipaddress").getAssociatedNetworkId().equals(networkId);
|
||||
return networkId.equals(checkNotNull(input, "ipaddress").getAssociatedNetworkId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import javax.annotation.Resource;
|
|||
import javax.inject.Inject;
|
||||
|
||||
import org.jclouds.cloudstack.CloudStackClient;
|
||||
import org.jclouds.cloudstack.domain.Account;
|
||||
import org.jclouds.cloudstack.domain.User;
|
||||
import org.jclouds.cloudstack.predicates.UserPredicates;
|
||||
import org.jclouds.logging.Logger;
|
||||
|
@ -66,9 +65,6 @@ public class GetCurrentUser implements Supplier<User> {
|
|||
users));
|
||||
}
|
||||
|
||||
if (currentUser.getAccountType() != Account.Type.USER) {
|
||||
logger.warn("Expecting an user account: %s", currentUser);
|
||||
}
|
||||
return currentUser;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue