cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [36/50] [abbrv] git commit: refs/heads/ui-multiple-nics - Merge branch 'master' into vim51_win8
Date Tue, 05 Mar 2013 18:37:39 GMT
Merge branch 'master' into vim51_win8

Conflicts:
	plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/613a0619
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/613a0619
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/613a0619

Branch: refs/heads/ui-multiple-nics
Commit: 613a061977ed0d4e9c3c37c741e968a35d2e18ce
Parents: 8b9c45b 7a54458
Author: Min Chen <min.chen@citrix.com>
Authored: Mon Mar 4 17:32:52 2013 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Mon Mar 4 17:32:52 2013 -0800

----------------------------------------------------------------------
 agent/conf/agent.properties                        |    2 +-
 api/src/com/cloud/network/IpAddress.java           |    3 +
 api/src/com/cloud/network/NetworkService.java      |   15 +-
 api/src/com/cloud/network/rules/RulesService.java  |    5 +-
 api/src/com/cloud/vm/Nic.java                      |    1 +
 api/src/com/cloud/vm/NicSecondaryIp.java           |   36 +++
 .../org/apache/cloudstack/api/ApiConstants.java    |    1 +
 .../apache/cloudstack/api/ResponseGenerator.java   |    7 +
 .../user/firewall/CreatePortForwardingRuleCmd.java |   19 ++-
 .../api/command/user/nat/EnableStaticNatCmd.java   |   12 +-
 .../api/command/user/vm/AddIpToVmNicCmd.java       |  176 +++++++++++
 .../api/command/user/vm/ListNicsCmd.java           |  133 +++++++++
 .../api/command/user/vm/RemoveIpFromVmNicCmd.java  |  123 ++++++++
 .../api/response/AddIpToVmNicResponse.java         |   85 ++++++
 .../cloudstack/api/response/IPAddressResponse.java |    8 +
 .../cloudstack/api/response/NicResponse.java       |   12 +-
 .../api/response/NicSecondaryIpResponse.java       |   85 ++++++
 .../api/command/test/AddIpToVmNicTest.java         |  132 +++++++++
 client/pom.xml                                     |    4 +
 client/tomcatconf/commands.properties.in           |    5 +
 docs/en-US/accessing-vms.xml                       |    4 +-
 docs/en-US/deployment-architecture-overview.xml    |    3 +-
 docs/en-US/zone-add.xml                            |    2 +-
 packaging/centos63/cloud.spec                      |    4 +
 .../BaremetalKickStartPxeResource.java             |    2 +-
 .../BaremetalKickStartServiceImpl.java             |   33 ++-
 .../PrepareKickstartPxeServerCommand.java          |   31 ++-
 .../kvm/resource/LibvirtComputingResource.java     |  116 ++++++--
 .../kvm/resource/LibvirtVifDriverTest.java         |  226 +++++++++++++++
 .../hypervisor/vmware/VmwareServerDiscoverer.java  |   35 ++-
 .../vmware/manager/VmwareManagerImpl.java          |   27 +-
 pom.xml                                            |    2 +
 .../ping/prepare_kickstart_kernel_initrd.py        |   55 ++--
 server/src/com/cloud/api/ApiDBUtils.java           |   10 +
 server/src/com/cloud/api/ApiResponseHelper.java    |   56 ++++
 .../api/query/dao/UserAccountJoinDaoImpl.java      |    9 +-
 server/src/com/cloud/network/NetworkManager.java   |   12 +
 .../src/com/cloud/network/NetworkManagerImpl.java  |   76 +++++-
 server/src/com/cloud/network/NetworkModelImpl.java |    5 +
 .../src/com/cloud/network/NetworkServiceImpl.java  |  170 +++++++++++
 server/src/com/cloud/network/addr/PublicIp.java    |   34 ++-
 server/src/com/cloud/network/dao/IPAddressDao.java |    7 +-
 .../com/cloud/network/dao/IPAddressDaoImpl.java    |   17 +-
 server/src/com/cloud/network/dao/IPAddressVO.java  |   16 +-
 .../router/VirtualNetworkApplianceManagerImpl.java |    3 +-
 .../com/cloud/network/rules/RulesManagerImpl.java  |  113 ++++++--
 .../network/rules/dao/PortForwardingRulesDao.java  |    2 +
 .../rules/dao/PortForwardingRulesDaoImpl.java      |    8 +
 .../src/com/cloud/server/ManagementServerImpl.java |    3 +
 server/src/com/cloud/vm/NicVO.java                 |   11 +
 server/src/com/cloud/vm/UserVmManagerImpl.java     |    8 +
 server/src/com/cloud/vm/dao/NicDao.java            |    2 +
 server/src/com/cloud/vm/dao/NicDaoImpl.java        |   12 +-
 server/src/com/cloud/vm/dao/NicSecondaryIpDao.java |   53 ++++
 .../com/cloud/vm/dao/NicSecondaryIpDaoImpl.java    |  138 +++++++++
 server/src/com/cloud/vm/dao/NicSecondaryIpVO.java  |  160 ++++++++++
 .../com/cloud/network/MockNetworkManagerImpl.java  |   47 +++
 .../com/cloud/network/MockRulesManagerImpl.java    |   19 +-
 .../test/com/cloud/vpc/MockNetworkManagerImpl.java |   73 +++++
 setup/db/db/schema-410to420.sql                    |   21 ++
 tools/apidoc/gen_toc.py                            |    3 +
 tools/marvin/marvin/codegenerator.py               |   49 ++--
 ui/scripts/docs.js                                 |   19 ++
 ui/scripts/globalSettings.js                       |    2 +-
 ui/scripts/system.js                               |   17 +-
 ui/scripts/ui/widgets/detailView.js                |    8 +-
 ui/scripts/zoneWizard.js                           |   16 +-
 utils/src/com/cloud/utils/db/Transaction.java      |    4 +-
 .../hypervisor/vmware/mo/VirtualSwitchType.java    |    8 +-
 69 files changed, 2397 insertions(+), 218 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/613a0619/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
----------------------------------------------------------------------
diff --cc plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
index e2de43b,e6d708c..94ba97d
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
@@@ -197,52 -191,72 +192,72 @@@ public class VmwareServerDiscoverer ext
          // <VSWITCHTYPE> 'vmwaresvs' is for vmware standard vswitch
          // <VSWITCHTYPE> 'vmwaredvs' is for vmware distributed virtual switch
          // <VSWITCHTYPE> 'nexusdvs' is for cisco nexus distributed virtual switch
+         // Get zone wide traffic labels for Guest traffic and Public traffic
+         guestTrafficLabel = _netmgr.getDefaultGuestTrafficLabel(dcId, HypervisorType.VMware);
+ 
+         // Process traffic label information provided at zone level and cluster level
+         guestTrafficLabelObj = getTrafficInfo(TrafficType.Guest, guestTrafficLabel, defaultVirtualSwitchType,
paramGuestVswitchType, paramGuestVswitchName, clusterId);
+ 
+         if (zoneType == NetworkType.Advanced) {
+             // Get zone wide traffic label for Public traffic
+             publicTrafficLabel = _netmgr.getDefaultPublicTrafficLabel(dcId, HypervisorType.VMware);
+ 
+             // Process traffic label information provided at zone level and cluster level
+             publicTrafficLabelObj = getTrafficInfo(TrafficType.Public, publicTrafficLabel,
defaultVirtualSwitchType, paramPublicVswitchType, paramPublicVswitchName, clusterId);
  
 -            // Configuration Check: A physical network cannot be shared by different types
of virtual switches.
 -            //
 -            // Check if different vswitch types are chosen for same physical network
 -            // 1. Get physical network for guest traffic - multiple networks
 -            // 2. Get physical network for public traffic - single network
 -            // See if 2 is in 1
 -            //  if no - pass
 -            //  if yes - compare publicTrafficLabelObj.getVirtualSwitchType() == guestTrafficLabelObj.getVirtualSwitchType()
 -            //      true  - pass
 -            //      false - throw exception - fail cluster add operation
 -
 -            List<? extends PhysicalNetwork> pNetworkListGuestTraffic = _netmgr.getPhysicalNtwksSupportingTrafficType(dcId,
TrafficType.Guest);
 -            List<? extends PhysicalNetwork> pNetworkListPublicTraffic = _netmgr.getPhysicalNtwksSupportingTrafficType(dcId,
TrafficType.Public);
 -            // Public network would be on single physical network hence getting first object
of the list would suffice.
 -            PhysicalNetwork pNetworkPublic = pNetworkListPublicTraffic.get(0);
 -            if (pNetworkListGuestTraffic.contains(pNetworkPublic)) {
 -                if (publicTrafficLabelObj.getVirtualSwitchType() != guestTrafficLabelObj.getVirtualSwitchType())
{
 -                    String msg = "Both public traffic and guest traffic is over same physical
network " + pNetworkPublic +
 -                            ". And virtual switch type chosen for each traffic is different"
+
 -                            ". A physical network cannot be shared by different types of
virtual switches.";
 -                    s_logger.error(msg);
 -                    throw new InvalidParameterValueException(msg);
 -                }
 +        // Configuration Check: A physical network cannot be shared by different types of
virtual switches.
 +        //
 +        // Check if different vswitch types are chosen for same physical network
 +        // 1. Get physical network for guest traffic - multiple networks
 +        // 2. Get physical network for public traffic - single network
 +        // See if 2 is in 1
 +        //  if no - pass
 +        //  if yes - compare publicTrafficLabelObj.getVirtualSwitchType() == guestTrafficLabelObj.getVirtualSwitchType()
 +        //      true  - pass
 +        //      false - throw exception - fail cluster add operation
++
 +        List<? extends PhysicalNetwork> pNetworkListGuestTraffic = _netmgr.getPhysicalNtwksSupportingTrafficType(dcId,
TrafficType.Guest);
 +        List<? extends PhysicalNetwork> pNetworkListPublicTraffic = _netmgr.getPhysicalNtwksSupportingTrafficType(dcId,
TrafficType.Public);
 +        // Public network would be on single physical network hence getting first object
of the list would suffice.
 +        PhysicalNetwork pNetworkPublic = pNetworkListPublicTraffic.get(0);
 +        if (pNetworkListGuestTraffic.contains(pNetworkPublic)) {
 +            if (publicTrafficLabelObj.getVirtualSwitchType() != guestTrafficLabelObj.getVirtualSwitchType())
{
 +                String msg = "Both public traffic and guest traffic is over same physical
network " + pNetworkPublic +
 +                        ". And virtual switch type chosen for each traffic is different"
+
 +                        ". A physical network cannot be shared by different types of virtual
switches.";
 +                s_logger.error(msg);
 +                throw new InvalidParameterValueException(msg);
              }
 +        }
+         } else {
+             // Distributed virtual switch is not supported in Basic zone for now.
+             // Private / Management network traffic is not yet supported over distributed
virtual switch.
+             if (guestTrafficLabelObj.getVirtualSwitchType() != VirtualSwitchType.StandardVirtualSwitch)
{
+                 String msg = "Detected that Guest traffic is over Distributed virtual switch
in Basic zone. Only Standard vSwitch is supported in Basic zone.";
+                 s_logger.error(msg);
+                 throw new DiscoveredWithErrorException(msg);
+             }
+         }
  
          privateTrafficLabel = _netmgr.getDefaultManagementTrafficLabel(dcId, HypervisorType.VMware);
 -        if (privateTrafficLabel != null) {
 +		if (privateTrafficLabel != null) {
              s_logger.info("Detected private network label : " + privateTrafficLabel);
 -        }
 +		}
  
          if (nexusDVS) {
- 			DataCenterVO zone = _dcDao.findById(dcId);
- 			NetworkType zoneType = zone.getNetworkType();
 -            if (zoneType != NetworkType.Basic) {
 +			if (zoneType != NetworkType.Basic) {
                  publicTrafficLabel = _netmgr.getDefaultPublicTrafficLabel(dcId, HypervisorType.VMware);
 -                if (publicTrafficLabel != null) {
 +				if (publicTrafficLabel != null) {
                      s_logger.info("Detected public network label : " + publicTrafficLabel);
 -                }
 -            }
 -            // Get physical network label
 +				}
 +			}
 +			// Get physical network label
              guestTrafficLabel = _netmgr.getDefaultGuestTrafficLabel(dcId, HypervisorType.VMware);
 -            if (guestTrafficLabel != null) {
 +			if (guestTrafficLabel != null) {
                  s_logger.info("Detected guest network label : " + guestTrafficLabel);
 -            }
 +			}
              vsmCredentials = _vmwareMgr.getNexusVSMCredentialsByClusterId(clusterId);
 -        }
 +		}
  
  		VmwareContext context = null;
  		try {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/613a0619/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --cc plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index e44054e,60b5ce4..9d29abf
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@@ -540,11 -533,14 +537,14 @@@ public class VmwareManagerImpl extends 
          if (url != null) {
              isoFile = new File(url.getPath());
          }
-         if (isoFile == null || !isoFile.exists()) {
-             isoFile = new File("/usr/lib64/cloud/common/" + "/vms/systemvm.iso");
-             if (!isoFile.exists()) {
-                 isoFile = new File("/usr/lib/cloud/common/" + "/vms/systemvm.iso");
-             }
 -        
++
+         if(isoFile == null || !isoFile.exists()) {
+             isoFile = new File("/usr/share/cloudstack-common/vms/systemvm.iso");
+         }
 -        
++
+         assert(isoFile != null);
+         if(!isoFile.exists()) {
+         	s_logger.error("Unable to locate systemvm.iso in your setup at " + isoFile.toString());
          }
          return isoFile;
      }
@@@ -558,11 -552,13 +556,12 @@@
          if ( url != null ){
              keyFile = new File(url.getPath());
          }
 -        
          if (keyFile == null || !keyFile.exists()) {
-             keyFile = new File("/usr/lib64/cloud/common" + "/scripts/vm/systemvm/id_rsa.cloud");
-             if (!keyFile.exists()) {
-                 keyFile = new File("/usr/lib/cloud/common" + "/scripts/vm/systemvm/id_rsa.cloud");
-             }
+             keyFile = new File("/usr/share/cloudstack-common/scripts/vm/systemvm/id_rsa.cloud");
+         }
+         assert(keyFile != null);
+         if(!keyFile.exists()) {
+         	s_logger.error("Unable to locate id_rsa.cloud in your setup at " + keyFile.toString());
          }
          return keyFile;
      }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/613a0619/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/613a0619/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------


Mime
View raw message