Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EEB1B189C8 for ; Mon, 17 Aug 2015 13:24:51 +0000 (UTC) Received: (qmail 13935 invoked by uid 500); 17 Aug 2015 13:24:51 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 13897 invoked by uid 500); 17 Aug 2015 13:24:51 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 13886 invoked by uid 99); 17 Aug 2015 13:24:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2015 13:24:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C682DFCCE; Mon, 17 Aug 2015 13:24:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: widodh@apache.org To: commits@cloudstack.apache.org Date: Mon, 17 Aug 2015 13:24:51 -0000 Message-Id: <3a93f07ba15847d88c2c03572ee2885f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] git commit: updated refs/heads/master to bc51a42 Repository: cloudstack Updated Branches: refs/heads/master 9c7e81e74 -> bc51a42fc http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5db33718/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java ---------------------------------------------------------------------- diff --git a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java index 7524510..dd81809 100644 --- a/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java +++ b/services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java @@ -101,6 +101,7 @@ import com.cloud.resource.ServerResource; import com.cloud.resource.UnableDeleteHostException; import com.cloud.service.ServiceOfferingVO; import com.cloud.service.dao.ServiceOfferingDao; +import com.cloud.storage.Storage; import com.cloud.storage.UploadVO; import com.cloud.storage.VMTemplateVO; import com.cloud.storage.dao.SnapshotDao; @@ -111,7 +112,6 @@ import com.cloud.storage.secondary.SecStorageVmAlertEventArgs; import com.cloud.storage.secondary.SecondaryStorageListener; import com.cloud.storage.secondary.SecondaryStorageVmAllocator; import com.cloud.storage.secondary.SecondaryStorageVmManager; -import com.cloud.storage.Storage; import com.cloud.storage.template.TemplateConstants; import com.cloud.template.TemplateManager; import com.cloud.user.Account; @@ -1086,16 +1086,16 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar for (NicProfile nic : profile.getNics()) { int deviceId = nic.getDeviceId(); - if (nic.getIp4Address() == null) { + if (nic.getIPv4Address() == null) { buf.append(" eth").append(deviceId).append("mask=").append("0.0.0.0"); buf.append(" eth").append(deviceId).append("ip=").append("0.0.0.0"); } else { - buf.append(" eth").append(deviceId).append("ip=").append(nic.getIp4Address()); - buf.append(" eth").append(deviceId).append("mask=").append(nic.getNetmask()); + buf.append(" eth").append(deviceId).append("ip=").append(nic.getIPv4Address()); + buf.append(" eth").append(deviceId).append("mask=").append(nic.getIPv4Netmask()); } if (nic.isDefaultNic()) { - buf.append(" gateway=").append(nic.getGateway()); + buf.append(" gateway=").append(nic.getIPv4Gateway()); } if (nic.getTrafficType() == TrafficType.Management) { String mgmt_cidr = _configDao.getValue(Config.ManagementNetwork.key()); @@ -1107,9 +1107,9 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar } else if (nic.getTrafficType() == TrafficType.Public) { buf.append(" public.network.device=").append("eth").append(deviceId); } else if (nic.getTrafficType() == TrafficType.Storage) { - buf.append(" storageip=").append(nic.getIp4Address()); - buf.append(" storagenetmask=").append(nic.getNetmask()); - buf.append(" storagegateway=").append(nic.getGateway()); + buf.append(" storageip=").append(nic.getIPv4Address()); + buf.append(" storagenetmask=").append(nic.getIPv4Netmask()); + buf.append(" storagegateway=").append(nic.getIPv4Gateway()); } } @@ -1147,11 +1147,11 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar for (NicProfile nic : nics) { if ((nic.getTrafficType() == TrafficType.Public && dc.getNetworkType() == NetworkType.Advanced) || (nic.getTrafficType() == TrafficType.Guest && (dc.getNetworkType() == NetworkType.Basic || dc.isSecurityGroupEnabled()))) { - secVm.setPublicIpAddress(nic.getIp4Address()); - secVm.setPublicNetmask(nic.getNetmask()); + secVm.setPublicIpAddress(nic.getIPv4Address()); + secVm.setPublicNetmask(nic.getIPv4Netmask()); secVm.setPublicMacAddress(nic.getMacAddress()); } else if (nic.getTrafficType() == TrafficType.Management) { - secVm.setPrivateIpAddress(nic.getIp4Address()); + secVm.setPrivateIpAddress(nic.getIPv4Address()); secVm.setPrivateMacAddress(nic.getMacAddress()); } } @@ -1167,7 +1167,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar for (NicProfile nic : profile.getNics()) { if (nic.getTrafficType() == TrafficType.Management) { managementNic = nic; - } else if (nic.getTrafficType() == TrafficType.Control && nic.getIp4Address() != null) { + } else if (nic.getTrafficType() == TrafficType.Control && nic.getIPv4Address() != null) { controlNic = nic; } } @@ -1185,7 +1185,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar controlNic = managementNic; } - CheckSshCommand check = new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922); + CheckSshCommand check = new CheckSshCommand(profile.getInstanceName(), controlNic.getIPv4Address(), 3922); cmds.addCommand("checkSsh", check); return true;