[ https://issues.apache.org/jira/browse/SLING-5900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simone Tripodi reassigned SLING-5900: ------------------------------------- Assignee: Simone Tripodi (was: Timothee Maret) > Improve create agents API handling of duplicate IDs > --------------------------------------------------- > > Key: SLING-5900 > URL: https://issues.apache.org/jira/browse/SLING-5900 > Project: Sling > Issue Type: Bug > Components: Distribution > Affects Versions: Content Distribution Core 0.1.18 > Reporter: Ana Vinatoru > Assignee: Simone Tripodi > Fix For: Content Distribution 0.2.0 > > > The distribution agent creation API has the wrong results in the following > scenarios: > * Scenario 1: > ** create agent with id Bob and type Forward > ** create agent with id Bob and type Reverse > ** the first agent is now replaced by the second one. I think this should be > an error case (i.e. if there's already an agent with the same ID and a > different type, the API should return an error). > * Scenario 2 > ** create agent with id Bob and type Forward > ** create agent with id Bob and type Forward > ** the properties of the first agent are overwritten by what we inputted at > step 2 > I am using the API from a create / update UI context, so one solution would > be to add an ":operation" parameter to distinguish between the two cases. > So a "create" on an existing agent resource should fail, regardless of agent > type, but an "update" should work. -- This message was sent by Atlassian JIRA (v6.3.4#6332)