Github user lahirus commented on a diff in the pull request: https://github.com/apache/stratos/pull/311#discussion_r30249647 --- Diff: components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java --- @@ -348,6 +349,28 @@ public void persistServiceGroup(ServiceGroup servicegroup) { } } + + public void updateServiceGroup(ServiceGroup serviceGroup) throws InvalidServiceGroupException { + try { + if (serviceGroup == null || StringUtils.isEmpty(serviceGroup.getName())) { + throw new IllegalArgumentException("Cartridge group or group name cannot be null"); + } + if (getServiceGroup(serviceGroup.getName()) == null) { + throw new InvalidServiceGroupException(String.format("Cartridge group does not exist: " + + "[cartridge-group] %s", serviceGroup.getName())); + } + + persistServiceGroup(serviceGroup); + + if (log.isDebugEnabled()) { + log.debug(String.format("Updated cartridge group: [group-name] %s", serviceGroup.getName())); + } + } catch (Exception e) { --- End diff -- We can throw the exception to client.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---