reworked version of !526 (closed). Fixed bug with setting of applicationType, added default configurations to behaviors and extended error messages.
Activity
mentioned in merge request !526 (closed)
Build Started: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/655/
Build finished. Tests PASSED. Build results available at: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/655/
assigned to @brano
- Resolved by Pawel Kochanowski
- Resolved by Pawel Kochanowski
- Resolved by Pawel Kochanowski
- Resolved by Branislav Katreniak
- Resolved by Pawel Kochanowski
- Resolved by Branislav Katreniak
- Resolved by Pawel Kochanowski
- Resolved by Pawel Kochanowski
Build Started: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/662/
Build finished. Tests PASSED. Build results available at: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/662/
I was able to modify the JSONWriter to allow sending raw json objects and current response looks like this: {"result":{"activeBasicScenes":[0,17,18]},"ok":true}
I would like to have confirmation from @mtross in either direction. Removing top-level
configuration
object is more concise but likely to be inconsistent with other methods. I don't have preferences in either direction. If @mtross stays silent, we merge what you push :)@brano I don't get the question about "removing top-level configuration object", missing the context of commit here? The JSON response lgtm, or is something inconsistent?
@mtross We discussed these 2 options:
{"result":{"activeBasicScenes":[0,17,18]},"ok":true}
{"result":{"configuration":{"activeBasicScenes":[0,17,18]}},"ok":true}
All our json responses I am aware of (not really much and I did no special investigation) are consistent with option 2. Capnproto (also grpc) rpc encourages option 2 to allow to add another output argument in backwards compatible way. Thrift, avro rpc don't care. I don't have strong opinion, but I am slightly in favor of 2.
I also do not have strong opinion on this so we can go with current state (option 1). One last questions are the location of API calls (zone or structure) and if we want to add applicationType to the call for clusters and user groups. See comment !526 (comment 36786).
Edited by Pawel Kochanowskiadded 1 commit
- 4418d7b1 - moved get/setGroupConfiguration from zone to structure
Build Started: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/671/
Just moved the handlers to structure. For me dealing with aplicationType is still not clear (required, optional, 0 etc.). I opt for requiring the argument for cluster and userApartmentApplications (userGA) and use the proper fixed one for all other groups. So dsm-api can stay as it is - return error if applicationType do not match and DSS will set valid arguments.
Build finished. Tests PASSED. Build results available at: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/671/
Build Started: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/675/
Build finished. Tests FAILED. Build results available at: http://dsjenkins.cloudapp.net/jenkins/job/dSS_MR/675/
938 938 return JSONWriter::failure("Could not find group with id : '" + _request.getParameter("groupID") + "'"); 939 939 } 940 940 941 if (group != NULL) { 942 // if not present the configuration is empty - default 943 std::string configuration = "{}"; 941 // by default we use current group application type, but can be overwritten by optional parameter 942 ApplicationType applicationType = group->getApplicationType(); mentioned in merge request !538 (merged)
Opened new MR after rebase on conflicting master (!538 (merged)). Closing this one to preserve comments.