Make plan reference in solum CLI consistent and confusion free

Bug #1352605 reported by Ravi Sankar Penta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Solum
Invalid
Wishlist
Unassigned

Bug Description

Currently, we allow plan creation with same name:

(a) $ solum app list
+--------------------------------------+-----------------+-------------------------+
| uuid | name | description |
+--------------------------------------+-----------------+-------------------------+
| ab253d75-1049-43ad-98d6-e99e347ee3bc | ghost | ghost blogging platform |
| bd6dc885-1052-450b-abdb-dd365e0e05b1 | ghost | ghost new blogging platform |
+--------------------------------------+-----------------+-------------------------+

(b) $ solum assembly create myAssembly ghost

(c) $ solum app show ab253d75-1049-43ad-98d6-e99e347ee3bc

Some issues:
 - In step (b), there is an ambiguity on which 'ghost' plan to choose
 - In step (b), plan name is used to reference a plan and in step (c), plan uuid is used to reference a plan.

Fix Options:
(1) Enforce plan name to be unique within a tenant and user should be able to reference a plan consistenly using either plan uuid or plan name(easy to remember/type).
(2) Always refer a plan using it's plan uuid. In this case, user may have to do 'app list' to get the desired plan uuid.

I prefer Option (1) for ease of use.

summary: - Make solum CLI consistent and confusion free
+ Make plan reference in solum CLI consistent and confusion free
Revision history for this message
Adrian Otto (aotto) wrote :

I suggest another option for addressing this.

In the event where using the name causes an ambiguity, return an error to the user amounting to

"There are is more than one resource named 'ghost', Please specify the UUID of the one you want to act upon".

This should be the default mode.

In addition, I'd like to see a configuration variable to allow for the OPTIONAL enforcement of unique names upon creation of resources. By default, this should be set to OFF. This way if cloud operators want a consistent user experience at the expense of unique names, they can get it.

The reason for my preference here is that we want to make it easy to create plans, and have the names be descriptive. If we are too restrictive, then we will end up with name values that are not meaningful (people will set it to the date stamp or something equally unhelpful in order to ensure that it's unique). With my suggested approach, we allow for duplication, but require you to be explicit only when needed.

At such time that we have a Solum Developers Guide (hint, hint) it should include guidance to developers to use UUIDs for acting on resources, not names. Use of names should be reserved for interactive CLI use.

Changed in solum:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

Check if this issue exists for the new 'app' data model.

tags: added: solum-api
Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

This is no longer an issue.

We support both names and uuids when using with app commands (solum app create, solum app show, etc.)

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

Marking this as 'Invalid'.

Changed in solum:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.