Set network limit to be 0 by default for Control/Management/Storage/Public networks (these networks are used by SSVM/ConsoleProxy/domR)

This commit is contained in:
alena 2011-03-28 15:47:20 -07:00
parent 5dec433529
commit d3357c6691
3 changed files with 6 additions and 2 deletions

View File

@ -48,7 +48,7 @@ public class UpdateNetworkOfferingCmd extends BaseCmd {
@Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="the display text of the network offering")
private String displayText;
@Parameter(name=ApiConstants.AVAILABILITY, type=CommandType.STRING, description="the availability of network offering. Default value is Required")
@Parameter(name=ApiConstants.AVAILABILITY, type=CommandType.STRING, description="the availability of network offering. Default value is Required for Guest Virtual network offering; Optional for Guest Direct network offering")
private String availability;
/////////////////////////////////////////////////////

View File

@ -332,7 +332,7 @@ public class NetworkOfferingVO implements NetworkOffering {
* @param trafficType
*/
public NetworkOfferingVO(String name, TrafficType trafficType) {
this(name, "System Offering for " + name, trafficType, true, false, null, null, null, false, Availability.Required, false, false, false, false, false, false, false, null);
this(name, "System Offering for " + name, trafficType, true, false, 0, 0, null, true, Availability.Required, false, false, false, false, false, false, false, null);
}
@Override

View File

@ -47,3 +47,7 @@ ALTER TABLE `cloud`.`network_offerings` MODIFY `guest_type` char(32);
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (138, 7, 'None');
UPDATE `cloud`.`network_offerings` SET `nw_rate`=0, `mc_rate`=0 WHERE system_only=1 and guest_type IS NULL;
UPDATE `cloud`.`network_offerings` SET `default`=1 WHERE system_only=1;