From: <cl...@hy...> - 2009-03-26 00:09:14
|
Author: clee Date: 2009-03-25 17:08:55 -0700 (Wed, 25 Mar 2009) New Revision: 12872 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=12872 Modified: branches/HQ_4_1/ui_plugins/mass/app/GroupController.groovy Log: [SUPPORT-4285] Explicitly set deleteMissing to sync group and remove unspecified resources [merge from HEAD] Modified: branches/HQ_4_1/ui_plugins/mass/app/GroupController.groovy =================================================================== --- branches/HQ_4_1/ui_plugins/mass/app/GroupController.groovy 2009-03-26 00:07:04 UTC (rev 12871) +++ branches/HQ_4_1/ui_plugins/mass/app/GroupController.groovy 2009-03-26 00:08:55 UTC (rev 12872) @@ -91,7 +91,6 @@ def sync(xmlOut, params) { String s = getUpload('args') def xmlDef = new XmlParser().parse(new StringReader(s)) - //def deleteMissing = xmlDef.'@deleteMissing'?.toBoolean() if (xmlDef.group.size() != 1) { xmlOut.error("Only 1 group supported for sync") @@ -210,6 +209,11 @@ } } + def deleteMissing = groupDef.'@deleteMissing'?.toBoolean() + if (!deleteMissing) { + shouldContain = (shouldContain + group.resources) as Set + } + println("Groups: " + shouldContain) // Set the resources group.setResources(user, shouldContain) |