From c57248aa4e25f75c7dfc925637a424a0fd541635 Mon Sep 17 00:00:00 2001 From: alena Date: Wed, 8 Jun 2011 17:38:44 -0700 Subject: [PATCH] bug 10199: don't allow network offering Name modification. UI has to be fixed as well --- .../com/cloud/api/commands/UpdateNetworkOfferingCmd.java | 8 +------- .../com/cloud/configuration/ConfigurationManagerImpl.java | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java b/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java index 23c9425803b..180063e6e5d 100644 --- a/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java +++ b/api/src/com/cloud/api/commands/UpdateNetworkOfferingCmd.java @@ -41,9 +41,6 @@ public class UpdateNetworkOfferingCmd extends BaseCmd { @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the id of the network offering") private Long id; - - @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the network offering") - private String networkOfferingName; @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, description="the display text of the network offering") private String displayText; @@ -55,10 +52,7 @@ public class UpdateNetworkOfferingCmd extends BaseCmd { /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// - public String getNetworkOfferingName() { - return networkOfferingName; - } - + public String getDisplayText() { return displayText; } diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index a205a776e02..a94981dc9cd 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -2837,7 +2837,6 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura public NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd) { String displayText = cmd.getDisplayText(); Long id = cmd.getId(); - String name = cmd.getNetworkOfferingName(); String availabilityStr = cmd.getAvailability(); Availability availability = null; @@ -2859,10 +2858,6 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura NetworkOfferingVO offering = _networkOfferingDao.createForUpdate(id); - if (name != null) { - offering.setName(name); - } - if (displayText != null) { offering.setDisplayText(displayText); }