diff --git a/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java b/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java index 67909676340..23c9425803b 100644 --- a/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java +++ b/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java @@ -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; ///////////////////////////////////////////////////// diff --git a/server/src/com/cloud/offerings/NetworkOfferingVO.java b/server/src/com/cloud/offerings/NetworkOfferingVO.java index 2a329652946..8c84ce9592d 100644 --- a/server/src/com/cloud/offerings/NetworkOfferingVO.java +++ b/server/src/com/cloud/offerings/NetworkOfferingVO.java @@ -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 diff --git a/setup/db/schema-222to224.sql b/setup/db/schema-222to224.sql index 3bd7b9cd9fa..b8a309af666 100644 --- a/setup/db/schema-222to224.sql +++ b/setup/db/schema-222to224.sql @@ -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; + +