Assembly creation with plan uuid
Bug #1401272 reported by
Melissa Kam
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Solum |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Assemblies currently can only be created with a plan uri and not a plan uuid. The plan uuid is taken from the plan uri to look up the plan anyway (https:/
Changed in solum: | |
status: | New → Triaged |
importance: | Undecided → Low |
milestone: | none → 2015.1.1 |
tags: | added: solum-api |
To post a comment you must log in.
The logic in assembly-create doesn't actually parse the contents of the resource identified by the plan URI. Instead, the URI is checked nominally for a matching host protocol and URL, and then the last field between slashes is parsed as the UUID.
Following the intent of the code, it seems requiring the whole URI is overkill, and we should consider just asking for the name-or-uuid of the plan if plans must live locally.
Alternatively, we should consider removing the same-host check, both because the method is flawed and because it's at odds with the U part of a URI. In that case, it seems the document at that URI (a planfile in some form) needs to be parsed into a plan so the assembly can use this new plan. If that is so, the creation of an assembly can be done in a single API call instead of requiring a plan get registered separately.
I don't know which of the two ways is better, though the former may be simpler from both an implementation and a user perspective.