cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [30/46] git commit: updated refs/heads/internallb to b7709b8
Date Tue, 16 Apr 2013 18:34:35 GMT
Internal LB:

1) Added network_offering_details DB table and corresponding VO/DAO objects. Change createNetworkOffering web services api to accept the map of key/value pairs as details.
2) Allow to have multiple providers for the same service for the network to support the case when LB service can have separate providers for Internal LB and Public LB


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

Branch: refs/heads/internallb
Commit: a4fc1d7d65191da6a49bce9fa0a64ce6e46ac85d
Parents: 4530ceb
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Mon Apr 15 13:45:25 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Mon Apr 15 14:42:20 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/network/NetworkModel.java        |    2 +
 api/src/com/cloud/offering/NetworkOffering.java    |    9 ++
 .../admin/network/CreateNetworkOfferingCmd.java    |   15 +++
 .../api/command/admin/router/ListRoutersCmd.java   |    2 +-
 .../api/response/NetworkOfferingResponse.java      |    9 ++
 client/tomcatconf/applicationContext.xml.in        |    1 +
 server/src/com/cloud/api/ApiResponseHelper.java    |    6 +
 .../cloud/configuration/ConfigurationManager.java  |    8 +-
 .../configuration/ConfigurationManagerImpl.java    |   41 ++++++-
 .../src/com/cloud/network/NetworkManagerImpl.java  |   16 ++--
 server/src/com/cloud/network/NetworkModelImpl.java |    8 ++
 .../cloud/offerings/NetworkOfferingDetailsVO.java  |   84 +++++++++++++++
 .../src/com/cloud/offerings/NetworkOfferingVO.java |   25 ++++-
 .../cloud/offerings/dao/NetworkOfferingDao.java    |    3 +
 .../offerings/dao/NetworkOfferingDaoImpl.java      |   22 ++++
 .../offerings/dao/NetworkOfferingDetailsDao.java   |   28 +++++
 .../dao/NetworkOfferingDetailsDaoImpl.java         |   54 +++++++++
 .../com/cloud/network/MockNetworkModelImpl.java    |    6 +
 .../cloud/vpc/MockConfigurationManagerImpl.java    |    2 +-
 .../test/com/cloud/vpc/MockNetworkModelImpl.java   |    6 +
 .../networkoffering/CreateNetworkOfferingTest.java |   17 ++--
 setup/db/db/schema-410to420.sql                    |   20 ++++-
 22 files changed, 352 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/api/src/com/cloud/network/NetworkModel.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java
index 6260d37..3c11bfa 100644
--- a/api/src/com/cloud/network/NetworkModel.java
+++ b/api/src/com/cloud/network/NetworkModel.java
@@ -268,4 +268,6 @@ public interface NetworkModel {
 
     List<String> getUsedIpsInNetwork(Network network);
 
+    Map<String, String> getNtwkOffDetails(long offId);
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/api/src/com/cloud/offering/NetworkOffering.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/offering/NetworkOffering.java b/api/src/com/cloud/offering/NetworkOffering.java
index bd14acd..4174359 100644
--- a/api/src/com/cloud/offering/NetworkOffering.java
+++ b/api/src/com/cloud/offering/NetworkOffering.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.offering;
 
+import java.util.Map;
+
 import org.apache.cloudstack.acl.InfrastructureEntity;
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
@@ -38,6 +40,11 @@ public interface NetworkOffering extends InfrastructureEntity, InternalIdentity,
         Disabled,
         Enabled
     }
+    
+    public enum Details {
+        internalLbProvider,
+        publicLbProvider
+    }
 
     public final static String SystemPublicNetwork = "System-Public-Network";
     public final static String SystemControlNetwork = "System-Control-Network";
@@ -114,5 +121,7 @@ public interface NetworkOffering extends InfrastructureEntity, InternalIdentity,
     boolean isInline();
 
     boolean getIsPersistent();
+    
+    Map getDetails();
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
index b48bf9e..d247234 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java
@@ -29,6 +29,7 @@ import org.apache.cloudstack.api.ApiErrorCode;
 import org.apache.cloudstack.api.BaseCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.BaseCmd.CommandType;
 import org.apache.cloudstack.api.response.NetworkOfferingResponse;
 import org.apache.cloudstack.api.response.ServiceOfferingResponse;
 
@@ -95,6 +96,10 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
 
     @Parameter(name=ApiConstants.IS_PERSISTENT, type=CommandType.BOOLEAN, description="true if network offering supports persistent networks; defaulted to false if not specified")
     private Boolean isPersistent;
+    
+    @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, since="4.2.0", description="Template details in key/value pairs." +
+    		" Supported keys are internallbprovider/publiclbprovider with service provider as a value")
+    protected Map details;
 
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
@@ -215,6 +220,16 @@ public class CreateNetworkOfferingCmd extends BaseCmd {
 
         return capabilityMap;
     }
+    
+    public Map<String, String> getDetails() {
+        if (details == null || details.isEmpty()) {
+            return null;
+        }
+
+        Collection paramsCollection = details.values();
+        Map<String, String> params = (Map<String, String>) (paramsCollection.toArray())[0];
+        return params;
+    }
 
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
index 8420612..296d95c 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
@@ -75,7 +75,7 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     @Parameter(name=ApiConstants.FOR_VPC, type=CommandType.BOOLEAN, description="if true is passed for this parameter, list only VPC routers")
     private Boolean forVpc;
     
-    @Parameter(name=ApiConstants.ROLE, type=CommandType.STRING, description="list routers by role (Virtual_router or Internal_lb_vm)")
+    @Parameter(name=ApiConstants.ROLE, type=CommandType.STRING, description="list routers by role (Virtual_router or Internal_lb_vm)", since="4.2.0")
     private String role;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
index b1dcd42..7a7e371 100644
--- a/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.response;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseResponse;
@@ -83,6 +84,10 @@ public class NetworkOfferingResponse extends BaseResponse {
 
     @SerializedName(ApiConstants.IS_PERSISTENT) @Param(description="true if network offering supports persistent networks, false otherwise")
     private Boolean isPersistent;
+    
+    @SerializedName(ApiConstants.DETAILS) @Param(description="additional key/value details tied with network offering", since="4.2.0")
+    private Map details;
+
 
     public void setId(String id) {
         this.id = id;
@@ -156,5 +161,9 @@ public class NetworkOfferingResponse extends BaseResponse {
     public void setIsPersistent(Boolean isPersistent) {
         this.isPersistent = isPersistent;
     }
+    
+    public void setDetails(Map details) {
+        this.details = details;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 7963071..c75e4dd 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -365,6 +365,7 @@
   <bean id="vpcServiceMapDaoImpl" class="com.cloud.network.vpc.dao.VpcServiceMapDaoImpl" />
   <bean id="vpnUserDaoImpl" class="com.cloud.network.dao.VpnUserDaoImpl" />
   <bean id="applicationLbRuleDaoImpl" class="org.apache.cloudstack.network.lb.dao.ApplicationLoadBalancerRuleDaoImpl" />
+  <bean id="networkOfferingDetailsDaoImpl" class="com.cloud.offerings.dao.NetworkOfferingDetailsDaoImpl" />
 
 
   <!--

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 6f90083..3cc5ee5 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -188,6 +188,7 @@ import com.cloud.network.Network;
 import com.cloud.network.Network.Capability;
 import com.cloud.network.Network.Provider;
 import com.cloud.network.Network.Service;
+import com.cloud.network.NetworkModel;
 import com.cloud.network.NetworkProfile;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.network.PhysicalNetwork;
@@ -288,6 +289,7 @@ public class ApiResponseHelper implements ResponseGenerator {
     private static final DecimalFormat s_percentFormat = new DecimalFormat("##.##");
     @Inject private EntityManager _entityMgr = null;
     @Inject private UsageService _usageSvc = null;
+    @Inject NetworkModel _ntwkModel;
 
     @Override
     public UserResponse createUserResponse(User user) {
@@ -2223,6 +2225,10 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setForVpc(ApiDBUtils.isOfferingForVpc(offering));
 
         response.setServices(serviceResponses);
+        
+        //set network offering details
+        response.setDetails(_ntwkModel.getNtwkOffDetails(offering.getId()));
+        
         response.setObjectName("networkoffering");
         return response;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/configuration/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManager.java b/server/src/com/cloud/configuration/ConfigurationManager.java
index d7faf19..237d4a1 100755
--- a/server/src/com/cloud/configuration/ConfigurationManager.java
+++ b/server/src/com/cloud/configuration/ConfigurationManager.java
@@ -180,8 +180,6 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
      * @param trafficType
      * @param tags
      * @param specifyVlan
-     * @param isPersistent
-     *            ;
      * @param networkRate
      *            TODO
      * @param serviceProviderMap
@@ -197,14 +195,16 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
      *            ;
      * @param specifyIpRanges
      *            TODO
+     * @param isPersistent
+     *            ;
+     * @param details TODO
      * @param id
-     * 
      * @return network offering object
      */
 
     NetworkOfferingVO createNetworkOffering(String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, Integer networkRate, Map<Service, Set<Provider>> serviceProviderMap,
             boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId, boolean conserveMode, Map<Service, Map<Capability, String>> serviceCapabilityMap,
-            boolean specifyIpRanges, boolean isPersistent);
+            boolean specifyIpRanges, boolean isPersistent, Map<String, String> details);
 
     Vlan createVlanAndPublicIpRange(long zoneId, long networkId, long physicalNetworkId, boolean forVirtualNetwork, Long podId, String startIP, String endIP, String vlanGateway, String vlanNetmask, String vlanId, Account vlanOwner, String startIPv6, String endIPv6, String vlanIp6Gateway, String vlanIp6Cidr) throws InsufficientCapacityException, ConcurrentOperationException, InvalidParameterValueException;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index fce3c01..8310d38 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3198,6 +3198,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         Network.GuestType guestType = null;
         boolean specifyIpRanges = cmd.getSpecifyIpRanges();
         boolean isPersistent = cmd.getIsPersistent();
+        Map<String, String> details = cmd.getDetails();
 
         // Verify traffic type
         for (TrafficType tType : TrafficType.values()) {
@@ -3368,7 +3369,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         }
 
         return createNetworkOffering(name, displayText, trafficType, tags, specifyVlan, availability, networkRate, serviceProviderMap, false, guestType, false,
-                serviceOfferingId, conserveMode, serviceCapabilityMap, specifyIpRanges, isPersistent);
+                serviceOfferingId, conserveMode, serviceCapabilityMap, specifyIpRanges, isPersistent, details);
     }
 
     void validateLoadBalancerServiceCapabilities(Map<Capability, String> lbServiceCapabilityMap) {
@@ -3456,7 +3457,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
     @DB
     public NetworkOfferingVO createNetworkOffering(String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, Integer networkRate,
             Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, Network.GuestType type, boolean systemOnly, Long serviceOfferingId,
-            boolean conserveMode, Map<Service, Map<Capability, String>> serviceCapabilityMap, boolean specifyIpRanges, boolean isPersistent) {
+            boolean conserveMode, Map<Service, Map<Capability, String>> serviceCapabilityMap, boolean specifyIpRanges, boolean isPersistent, Map<String, String> details) {
 
         String multicastRateStr = _configDao.getValue("multicast.throttling.rate");
         int multicastRate = ((multicastRateStr == null) ? 10 : Integer.parseInt(multicastRateStr));
@@ -3568,13 +3569,18 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         if (serviceOfferingId != null) {
             offering.setServiceOfferingId(serviceOfferingId);
         }
+        
+        //validate the details
+        if (details != null) {
+            validateNtwkOffDetails(details, serviceProviderMap);
+        }
 
         Transaction txn = Transaction.currentTxn();
         txn.start();
-        // create network offering object
+        //1) create network offering object
         s_logger.debug("Adding network offering " + offering);
-        offering = _networkOfferingDao.persist(offering);
-        // populate services and providers
+        offering = _networkOfferingDao.persist(offering, details);
+        //2) populate services and providers
         if (serviceProviderMap != null) {
             for (Network.Service service : serviceProviderMap.keySet()) {
                 Set<Provider> providers = serviceProviderMap.get(service);
@@ -3608,6 +3614,31 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         return offering;
     }
 
+    protected void validateNtwkOffDetails(Map<String, String> details, Map<Service, Set<Provider>> serviceProviderMap) {
+        for (String key : details.keySet()) {
+            NetworkOffering.Details detail = null;
+            for (NetworkOffering.Details value : NetworkOffering.Details.values()) {
+                if (key.equalsIgnoreCase(value.toString())) {
+                    detail = value;
+                    break;
+                }
+            }
+            if (detail == null) {
+                throw new InvalidParameterValueException("Unsupported detail key");
+            }
+            if (detail == NetworkOffering.Details.internalLbProvider || detail == NetworkOffering.Details.publicLbProvider) {
+                Provider provider = Network.Provider.getProvider(details.get(key));
+                if (provider == null) {
+                    throw new InvalidParameterValueException("Invalid value for the key " + key);
+                }
+                Set<Provider> providers = serviceProviderMap.get(Service.Lb);
+                if (providers == null || !providers.contains(details.get(key))) {
+                    throw new InvalidParameterValueException("Invalid value for the key " + key + ". The provider is not supported by the network offering");
+                }
+            }
+        }
+    }
+
 
     @Override
     public List<? extends NetworkOffering> searchForNetworkOfferings(ListNetworkOfferingsCmd cmd) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index d4e4e09..c41e133 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -998,7 +998,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
                     _configMgr.createNetworkOffering(NetworkOffering.QuickCloudNoServices,
                             "Offering for QuickCloud with no services", TrafficType.Guest, null, true,
                             Availability.Optional, null, new HashMap<Network.Service, Set<Network.Provider>>(), true,
-                            Network.GuestType.Shared, false, null, true, null, true, false);
+                            Network.GuestType.Shared, false, null, true, null, true, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
@@ -1007,14 +1007,14 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
                     _configMgr.createNetworkOffering(NetworkOffering.DefaultSharedNetworkOfferingWithSGService,
                             "Offering for Shared Security group enabled networks", TrafficType.Guest, null, true,
                             Availability.Optional, null, defaultSharedNetworkOfferingProviders, true,
-                            Network.GuestType.Shared, false, null, true, null, true, false);
+                            Network.GuestType.Shared, false, null, true, null, true, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
 
         if (_networkOfferingDao.findByUniqueName(NetworkOffering.DefaultSharedNetworkOffering) == null) {
             offering = _configMgr.createNetworkOffering(NetworkOffering.DefaultSharedNetworkOffering, "Offering for Shared networks", TrafficType.Guest, null, true, Availability.Optional, null,
-                    defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, true, null, true, false);
+                    defaultSharedNetworkOfferingProviders, true, Network.GuestType.Shared, false, null, true, null, true, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
@@ -1037,7 +1037,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             offering = _configMgr.createNetworkOffering(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService,
                     "Offering for Isolated networks with Source Nat service enabled", TrafficType.Guest,
                     null, false, Availability.Required, null, defaultINetworkOfferingProvidersForVpcNetwork,
-                    true, Network.GuestType.Isolated, false, null, true, null, false, false);
+                    true, Network.GuestType.Isolated, false, null, true, null, false, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
@@ -1046,7 +1046,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             offering = _configMgr.createNetworkOffering(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworks,
                     "Offering for Isolated VPC networks with Source Nat service enabled", TrafficType.Guest,
                     null, false, Availability.Optional, null, defaultVPCOffProviders,
-                    true, Network.GuestType.Isolated, false, null, false, null, false, false);
+                    true, Network.GuestType.Isolated, false, null, false, null, false, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
@@ -1057,7 +1057,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             offering = _configMgr.createNetworkOffering(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksNoLB,
                     "Offering for Isolated VPC networks with Source Nat service enabled and LB service disabled", TrafficType.Guest,
                     null, false, Availability.Optional, null, defaultVPCOffProviders,
-                    true, Network.GuestType.Isolated, false, null, false, null, false, false);
+                    true, Network.GuestType.Isolated, false, null, false, null, false, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
@@ -1066,7 +1066,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             offering = _configMgr.createNetworkOffering(NetworkOffering.DefaultIsolatedNetworkOffering,
                     "Offering for Isolated networks with no Source Nat service", TrafficType.Guest, null, true,
                     Availability.Optional, null, defaultIsolatedNetworkOfferingProviders, true, Network.GuestType.Isolated,
-                    false, null, true, null, true, false);
+                    false, null, true, null, true, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             _networkOfferingDao.update(offering.getId(), offering);
         }
@@ -1095,7 +1095,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
 
         if (_networkOfferingDao.findByUniqueName(NetworkOffering.DefaultSharedEIPandELBNetworkOffering) == null) {
             offering = _configMgr.createNetworkOffering(NetworkOffering.DefaultSharedEIPandELBNetworkOffering, "Offering for Shared networks with Elastic IP and Elastic LB capabilities", TrafficType.Guest, null, true,
-                    Availability.Optional, null, netscalerServiceProviders, true, Network.GuestType.Shared, false, null, true, serviceCapabilityMap, true, false);
+                    Availability.Optional, null, netscalerServiceProviders, true, Network.GuestType.Shared, false, null, true, serviceCapabilityMap, true, false, null);
             offering.setState(NetworkOffering.State.Enabled);
             offering.setDedicatedLB(false);
             _networkOfferingDao.update(offering.getId(), offering);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index e9627d7..33b9cd9 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -88,6 +88,7 @@ import com.cloud.offering.NetworkOffering;
 import com.cloud.offerings.NetworkOfferingServiceMapVO;
 import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.offerings.dao.NetworkOfferingDao;
+import com.cloud.offerings.dao.NetworkOfferingDetailsDao;
 import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
 import com.cloud.projects.dao.ProjectAccountDao;
 import com.cloud.user.Account;
@@ -185,6 +186,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
     ApplicationLoadBalancerRuleDao _appLbRuleDao;
     @Inject
     private ProjectAccountDao _projectAccountDao;
+    @Inject
+    NetworkOfferingDetailsDao _ntwkOffDetailsDao;
 
     private final HashMap<String, NetworkOfferingVO> _systemNetworks = new HashMap<String, NetworkOfferingVO>(5);
     static Long _privateOfferingId = null;
@@ -2074,4 +2077,9 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         
         return _ipAddressDao.findByIpAndSourceNetworkId(networks.get(0).getId(), ipAddress);
     }
+    
+    @Override
+    public Map<String, String> getNtwkOffDetails(long offId) {
+        return _ntwkOffDetailsDao.getNtwkOffDetails(offId);
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/offerings/NetworkOfferingDetailsVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/NetworkOfferingDetailsVO.java b/server/src/com/cloud/offerings/NetworkOfferingDetailsVO.java
new file mode 100644
index 0000000..744400b
--- /dev/null
+++ b/server/src/com/cloud/offerings/NetworkOfferingDetailsVO.java
@@ -0,0 +1,84 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.offerings;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.apache.cloudstack.api.InternalIdentity;
+
+@Entity
+@Table(name="network_offering_details")
+public class NetworkOfferingDetailsVO implements InternalIdentity {
+    @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
+    @Column(name="id")
+    private long id;
+    
+    @Column(name="network_offering_id")
+    private long offeringId;
+    
+    @Column(name="name")
+    private String name;
+    
+    @Column(name="value", length=1024)
+    private String value;
+    
+    public NetworkOfferingDetailsVO() {}
+    
+    public NetworkOfferingDetailsVO(long offeringId, String name, String value) {
+        this.offeringId = offeringId;
+        this.name = name;
+        this.value = value;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public long getOfferingId() {
+        return offeringId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public void setOfferingId(long offeringId) {
+        this.offeringId = offeringId;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/offerings/NetworkOfferingVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/NetworkOfferingVO.java b/server/src/com/cloud/offerings/NetworkOfferingVO.java
index 5de76a5..ef6cc03 100755
--- a/server/src/com/cloud/offerings/NetworkOfferingVO.java
+++ b/server/src/com/cloud/offerings/NetworkOfferingVO.java
@@ -16,15 +16,25 @@
 // under the License.
 package com.cloud.offerings;
 
+import java.util.Date;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
 import com.cloud.network.Network;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.utils.db.GenericDao;
 
-import javax.persistence.*;
-import java.util.Date;
-import java.util.UUID;
-
 @Entity
 @Table(name = "network_offerings")
 public class NetworkOfferingVO implements NetworkOffering {
@@ -123,6 +133,9 @@ public class NetworkOfferingVO implements NetworkOffering {
     public String getDisplayText() {
         return displayText;
     }
+    
+    @Transient
+    Map details;
 
     @Override
     public long getId() {
@@ -377,5 +390,9 @@ public class NetworkOfferingVO implements NetworkOffering {
     public boolean getIsPersistent() {
         return isPersistent;
     }
+    
+    public Map getDetails() {
+        return this.details;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/offerings/dao/NetworkOfferingDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/dao/NetworkOfferingDao.java b/server/src/com/cloud/offerings/dao/NetworkOfferingDao.java
index 405d348..5196932 100644
--- a/server/src/com/cloud/offerings/dao/NetworkOfferingDao.java
+++ b/server/src/com/cloud/offerings/dao/NetworkOfferingDao.java
@@ -17,6 +17,7 @@
 package com.cloud.offerings.dao;
 
 import java.util.List;
+import java.util.Map;
 
 import com.cloud.network.Network;
 import com.cloud.network.Networks.TrafficType;
@@ -57,4 +58,6 @@ public interface NetworkOfferingDao extends GenericDao<NetworkOfferingVO, Long>
 
     List<NetworkOfferingVO> listByTrafficTypeGuestTypeAndState(NetworkOffering.State state, TrafficType trafficType, Network.GuestType type);
 
+    NetworkOfferingVO persist(NetworkOfferingVO off, Map<String, String> details);
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java b/server/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
index d1e4424..af21ca7 100644
--- a/server/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
+++ b/server/src/com/cloud/offerings/dao/NetworkOfferingDaoImpl.java
@@ -17,8 +17,10 @@
 package com.cloud.offerings.dao;
 
 import java.util.List;
+import java.util.Map;
 
 import javax.ejb.Local;
+import javax.inject.Inject;
 import javax.persistence.EntityExistsException;
 
 import org.springframework.stereotype.Component;
@@ -27,6 +29,7 @@ import com.cloud.network.Network;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.offering.NetworkOffering.Availability;
+import com.cloud.offerings.NetworkOfferingDetailsVO;
 import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.GenericDaoBase;
@@ -45,6 +48,7 @@ public class NetworkOfferingDaoImpl extends GenericDaoBase<NetworkOfferingVO, Lo
     final SearchBuilder<NetworkOfferingVO> AvailabilitySearch;
     final SearchBuilder<NetworkOfferingVO> AllFieldsSearch;
     private final GenericSearchBuilder<NetworkOfferingVO, Long> UpgradeSearch;
+    @Inject NetworkOfferingDetailsDao _detailsDao;
 
     protected NetworkOfferingDaoImpl() {
         super();
@@ -165,5 +169,23 @@ public class NetworkOfferingDaoImpl extends GenericDaoBase<NetworkOfferingVO, Lo
         sc.setParameters("state", state);
         return listBy(sc, null);
     }
+    
+    @Override
+    @DB
+    public NetworkOfferingVO persist(NetworkOfferingVO off, Map<String, String> details) {
+        Transaction txn = Transaction.currentTxn();
+        txn.start();
+        //1) TODO - persist the details
+        if (details != null && !details.isEmpty()) {
+            for (String detail : details.keySet()) {
+                _detailsDao.persist(new NetworkOfferingDetailsVO(off.getId(), detail, details.get(detail)));
+            }
+        }
+
+        //2) persist the offering
+        NetworkOfferingVO vo = super.persist(off);
+        txn.commit();
+        return vo;
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDao.java b/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDao.java
new file mode 100644
index 0000000..a0b0daa
--- /dev/null
+++ b/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDao.java
@@ -0,0 +1,28 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.offerings.dao;
+
+import java.util.Map;
+
+import com.cloud.offerings.NetworkOfferingDetailsVO;
+import com.cloud.utils.db.GenericDao;
+
+public interface NetworkOfferingDetailsDao extends GenericDao<NetworkOfferingDetailsVO, Long>{
+
+    Map<String, String> getNtwkOffDetails(long offeringId);
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDaoImpl.java b/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDaoImpl.java
new file mode 100644
index 0000000..69ff6f7
--- /dev/null
+++ b/server/src/com/cloud/offerings/dao/NetworkOfferingDetailsDaoImpl.java
@@ -0,0 +1,54 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.offerings.dao;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.cloud.offerings.NetworkOfferingDetailsVO;
+import com.cloud.storage.VMTemplateDetailVO;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class NetworkOfferingDetailsDaoImpl extends GenericDaoBase<NetworkOfferingDetailsVO, Long> implements NetworkOfferingDetailsDao{
+    protected final SearchBuilder<NetworkOfferingDetailsVO> DetailSearch;
+    
+    public NetworkOfferingDetailsDaoImpl() {
+        
+        DetailSearch = createSearchBuilder();
+        DetailSearch.and("offeringId", DetailSearch.entity().getOfferingId(), SearchCriteria.Op.EQ);
+        DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ);
+        DetailSearch.done();
+    }
+    
+    @Override
+    public Map<String, String> getNtwkOffDetails(long offeringId) {
+        SearchCriteria<NetworkOfferingDetailsVO> sc = DetailSearch.create();
+        sc.setParameters("offeringId", offeringId);
+        
+        List<NetworkOfferingDetailsVO> results = search(sc, null);
+        Map<String, String> details = new HashMap<String, String>(results.size());
+        for (NetworkOfferingDetailsVO result : results) {
+            details.put(result.getName(), result.getValue());
+        }
+        
+        return details;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/test/com/cloud/network/MockNetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/MockNetworkModelImpl.java b/server/test/com/cloud/network/MockNetworkModelImpl.java
index 72e2f26..2ef23cd 100644
--- a/server/test/com/cloud/network/MockNetworkModelImpl.java
+++ b/server/test/com/cloud/network/MockNetworkModelImpl.java
@@ -862,4 +862,10 @@ public class MockNetworkModelImpl extends ManagerBase implements NetworkModel {
         // TODO Auto-generated method stub
         return null;
     }
+
+    @Override
+    public Map<String, String> getNtwkOffDetails(long offId) {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
index a03e361..e7c2cee 100755
--- a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
@@ -500,7 +500,7 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu
     @Override
     public NetworkOfferingVO createNetworkOffering(String name, String displayText, TrafficType trafficType, String tags, boolean specifyVlan, Availability availability, Integer networkRate,
             Map<Service, Set<Provider>> serviceProviderMap, boolean isDefault, GuestType type, boolean systemOnly, Long serviceOfferingId, boolean conserveMode,
-            Map<Service, Map<Capability, String>> serviceCapabilityMap, boolean specifyIpRanges, boolean isPersistent) {
+            Map<Service, Map<Capability, String>> serviceCapabilityMap, boolean specifyIpRanges, boolean isPersistent, Map<String, String> details) {
         // TODO Auto-generated method stub
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/test/com/cloud/vpc/MockNetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkModelImpl.java b/server/test/com/cloud/vpc/MockNetworkModelImpl.java
index 22a1c6f..4bbdd19 100644
--- a/server/test/com/cloud/vpc/MockNetworkModelImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkModelImpl.java
@@ -875,4 +875,10 @@ public class MockNetworkModelImpl extends ManagerBase implements NetworkModel {
         return null;
     }
 
+    @Override
+    public Map<String, String> getNtwkOffDetails(long offId) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java b/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
index cbb6c00..bcfc46a 100644
--- a/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
+++ b/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
@@ -80,6 +80,7 @@ public class CreateNetworkOfferingTest extends TestCase{
         Mockito.when(configDao.findByName(Mockito.anyString())).thenReturn(configVO);
         
         Mockito.when(offDao.persist(Mockito.any(NetworkOfferingVO.class))).thenReturn(new NetworkOfferingVO());
+        Mockito.when(offDao.persist(Mockito.any(NetworkOfferingVO.class), Mockito.anyMap())).thenReturn(new NetworkOfferingVO());
         Mockito.when(mapDao.persist(Mockito.any(NetworkOfferingServiceMapVO.class))).thenReturn(new NetworkOfferingServiceMapVO());
         Mockito.when(accountMgr.getSystemUser()).thenReturn(new UserVO(1));
         Mockito.when(accountMgr.getSystemAccount()).thenReturn(new AccountVO(2));
@@ -92,7 +93,7 @@ public class CreateNetworkOfferingTest extends TestCase{
     public void createSharedNtwkOffWithVlan() {
         NetworkOfferingVO off = configMgr.createNetworkOffering("shared", "shared", TrafficType.Guest, null, true,
                 Availability.Optional, 200, null, false, Network.GuestType.Shared, false,
-                null, false, null, true, false);
+                null, false, null, true, false, null);
         assertNotNull("Shared network offering with specifyVlan=true failed to create ", off);
     }
     
@@ -101,7 +102,7 @@ public class CreateNetworkOfferingTest extends TestCase{
         try {
             NetworkOfferingVO off = configMgr.createNetworkOffering("shared", "shared", TrafficType.Guest, null, false,
                     Availability.Optional, 200, null, false, Network.GuestType.Shared, false,
-                    null, false, null, true, false);
+                    null, false, null, true, false, null);
             assertNull("Shared network offering with specifyVlan=false was created", off);
         } catch (InvalidParameterValueException ex) {
         }
@@ -111,7 +112,7 @@ public class CreateNetworkOfferingTest extends TestCase{
     public void createSharedNtwkOffWithSpecifyIpRanges() {
         NetworkOfferingVO off = configMgr.createNetworkOffering("shared", "shared", TrafficType.Guest, null, true,
                 Availability.Optional, 200, null, false, Network.GuestType.Shared, false,
-                null, false, null, true, false);
+                null, false, null, true, false, null);
         
         assertNotNull("Shared network offering with specifyIpRanges=true failed to create ", off);
     }
@@ -121,7 +122,7 @@ public class CreateNetworkOfferingTest extends TestCase{
         try {
             NetworkOfferingVO off = configMgr.createNetworkOffering("shared", "shared", TrafficType.Guest, null, true,
                     Availability.Optional, 200, null, false, Network.GuestType.Shared, false,
-                    null, false, null, false, false);
+                    null, false, null, false, false, null);
             assertNull("Shared network offering with specifyIpRanges=false was created", off);
         } catch (InvalidParameterValueException ex) {
         }
@@ -136,7 +137,7 @@ public class CreateNetworkOfferingTest extends TestCase{
         serviceProviderMap.put(Network.Service.SourceNat, vrProvider);
         NetworkOfferingVO off = configMgr.createNetworkOffering("isolated", "isolated", TrafficType.Guest, null, false,
                 Availability.Optional, 200, serviceProviderMap, false, Network.GuestType.Isolated, false,
-                null, false, null, false, false);
+                null, false, null, false, false, null);
         
         assertNotNull("Isolated network offering with specifyIpRanges=false failed to create ", off);
     }
@@ -149,7 +150,7 @@ public class CreateNetworkOfferingTest extends TestCase{
         serviceProviderMap.put(Network.Service.SourceNat, vrProvider);
         NetworkOfferingVO off = configMgr.createNetworkOffering("isolated", "isolated", TrafficType.Guest, null, true,
                 Availability.Optional, 200, serviceProviderMap, false, Network.GuestType.Isolated, false,
-                null, false, null, false, false);
+                null, false, null, false, false, null);
         assertNotNull("Isolated network offering with specifyVlan=true wasn't created", off);
        
     }
@@ -163,7 +164,7 @@ public class CreateNetworkOfferingTest extends TestCase{
             serviceProviderMap.put(Network.Service.SourceNat, vrProvider);
             NetworkOfferingVO off = configMgr.createNetworkOffering("isolated", "isolated", TrafficType.Guest, null, false,
                     Availability.Optional, 200, serviceProviderMap, false, Network.GuestType.Isolated, false,
-                    null, false, null, true, false);
+                    null, false, null, true, false, null);
             assertNull("Isolated network offering with specifyIpRanges=true and source nat service enabled, was created", off);
         } catch (InvalidParameterValueException ex) {
         }
@@ -176,7 +177,7 @@ public class CreateNetworkOfferingTest extends TestCase{
         Set<Network.Provider> vrProvider = new HashSet<Network.Provider>();
         NetworkOfferingVO off = configMgr.createNetworkOffering("isolated", "isolated", TrafficType.Guest, null, false,
                 Availability.Optional, 200, serviceProviderMap, false, Network.GuestType.Isolated, false,
-                null, false, null, true, false);
+                null, false, null, true, false, null);
         assertNotNull("Isolated network offering with specifyIpRanges=true and with no sourceNatService, failed to create", off);
         
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4fc1d7d/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index d38a6a9..453120a 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -796,4 +796,22 @@ ALTER VIEW `cloud`.`domain_router_view` AS
             left join
         `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
             and async_job.instance_type = 'DomainRouter'
-            and async_job.job_status = 0;
\ No newline at end of file
+            and async_job.job_status = 0;
+
+
+-- Add details talbe for the network offering
+CREATE TABLE `cloud`.`network_offering_details` (
+  `id` bigint unsigned NOT NULL auto_increment,
+  `network_offering_id` bigint unsigned NOT NULL COMMENT 'network offering id',
+  `name` varchar(255) NOT NULL,
+  `value` varchar(1024) NOT NULL,
+  PRIMARY KEY (`id`),
+  CONSTRAINT `fk_network_offering_details__network_offering_id` FOREIGN KEY `fk_network_offering_details__network_offering_id`(`network_offering_id`) REFERENCES `network_offerings`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- Change the constraint for the network service map table. Now we support multiple provider for the same service
+ALTER TABLE `cloud`.`ntwk_service_map` DROP FOREIGN KEY `fk_ntwk_service_map__network_id`;
+ALTER TABLE `cloud`.`ntwk_service_map` DROP INDEX `network_id`;
+
+ALTER TABLE `cloud`.`ntwk_service_map` ADD UNIQUE `network_id` (`network_id`,`service`,`provider`);
+ALTER TABLE `cloud`.`ntwk_service_map` ADD  CONSTRAINT `fk_ntwk_service_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks` (`id`) ON DELETE CASCADE;


Mime
View raw message