Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-04-05 Thread Dean Troyer
On Tuesday, April 5, 2016, Duncan Thomas  wrote:

> What about commands the become ambiguous in the future? I doubt there are
> many operations or objects that are unique to Cinder - backup, snapshot,
> transfer, group, type - these are all very much generic, and even if they
> aren't ambiguous now, they might well become so in future
>

This is one reason I phrase this as "name the resource" and not "add
API name"..  The text you use may not always be the API name.  I do not
have an example of this for Volume, but in Compute "flavor" is a good
example, as it would (will someday soon) be named "server flavor".  That is
also an example of it taking >3 years for a resource to need qualifying.

dt

>

-- 
-- 
Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-04-05 Thread Jay Bryant
Duncan,

Agreed, but the OSC team is concerned about unnecessarily adding API names
into commands as much as the Cinder team wishes to make it clearer which
commands belong to our component. This is where we need to keep this
discussion open with the OSC team to find a good common ground. I am hoping
to have Slade Baumann and Jacob Gregor work this issue actively with Sheel.
We need to pull you in as well given your views on this. I will make sure
they keep you in the loop.

Jay

On Tue, Apr 5, 2016 at 10:24 AM Duncan Thomas 
wrote:

> What about commands the become ambiguous in the future? I doubt there are
> many operations or objects that are unique to Cinder - backup, snapshot,
> transfer, group, type - these are all very much generic, and even if they
> aren't ambiguous now, they might well become so in future...
>
> On 5 April 2016 at 17:15, Jay Bryant 
> wrote:
>
>> All,
>>
>> Just to document the discussion we had during the OSC IRC meeting last
>> week: I believe the consensus we reached was that it wasn't appropriate to
>> pretend "volume" before all Cinder commands but that it would be
>> appropriate to move in that direction to for any commands that may be
>> ambiguous like "snapshot". The cinder core development team will start
>> working with the OSC development teams to address such commands and move
>> them to more user friendly commands and as we move forward we will work to
>> avoid such confusion in the future.
>>
>> Jay
>>
>> On Mon, Mar 28, 2016 at 1:15 PM Dean Troyer  wrote:
>>
>>> On Sun, Mar 27, 2016 at 6:11 PM, Mike Perez  wrote:
>>>
 On 00:40 Mar 28, Jordan Pittier wrote:
 > I am going to play the devil's advocate here but why can"t
 > python-openstackclient have its own opinion on the matter ? This CLI
 seems
 > to be for humans and humans love names/labels/tags and find UUIDS
 hard to
 > remember. Advanced users who want anonymous volumes can always hit
 the API
 > directly with curl or whatever SDK.

 I suppose it could, however, names are not unique.

>>>
>>> Names are not unique in much of OpenStack.  When ambiguity exists, we
>>> exit with an error.
>>>
>>> Also, this works to produce a volume with no name should you absolutely
>>> require it:
>>>
>>> openstack volume create --size 10 ""
>>>
>>>
>>> dt
>>> --
>>>
>>> Dean Troyer
>>> dtro...@gmail.com
>>>
>>> __
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe:
>>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> --
> Duncan Thomas
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-04-05 Thread Jay Bryant
All,

Just to document the discussion we had during the OSC IRC meeting last
week: I believe the consensus we reached was that it wasn't appropriate to
pretend "volume" before all Cinder commands but that it would be
appropriate to move in that direction to for any commands that may be
ambiguous like "snapshot". The cinder core development team will start
working with the OSC development teams to address such commands and move
them to more user friendly commands and as we move forward we will work to
avoid such confusion in the future.

Jay

On Mon, Mar 28, 2016 at 1:15 PM Dean Troyer  wrote:

> On Sun, Mar 27, 2016 at 6:11 PM, Mike Perez  wrote:
>
>> On 00:40 Mar 28, Jordan Pittier wrote:
>> > I am going to play the devil's advocate here but why can"t
>> > python-openstackclient have its own opinion on the matter ? This CLI
>> seems
>> > to be for humans and humans love names/labels/tags and find UUIDS hard
>> to
>> > remember. Advanced users who want anonymous volumes can always hit the
>> API
>> > directly with curl or whatever SDK.
>>
>> I suppose it could, however, names are not unique.
>>
>
> Names are not unique in much of OpenStack.  When ambiguity exists, we exit
> with an error.
>
> Also, this works to produce a volume with no name should you absolutely
> require it:
>
> openstack volume create --size 10 ""
>
>
> dt
> --
>
> Dean Troyer
> dtro...@gmail.com
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-04-05 Thread Duncan Thomas
What about commands the become ambiguous in the future? I doubt there are
many operations or objects that are unique to Cinder - backup, snapshot,
transfer, group, type - these are all very much generic, and even if they
aren't ambiguous now, they might well become so in future...

On 5 April 2016 at 17:15, Jay Bryant  wrote:

> All,
>
> Just to document the discussion we had during the OSC IRC meeting last
> week: I believe the consensus we reached was that it wasn't appropriate to
> pretend "volume" before all Cinder commands but that it would be
> appropriate to move in that direction to for any commands that may be
> ambiguous like "snapshot". The cinder core development team will start
> working with the OSC development teams to address such commands and move
> them to more user friendly commands and as we move forward we will work to
> avoid such confusion in the future.
>
> Jay
>
> On Mon, Mar 28, 2016 at 1:15 PM Dean Troyer  wrote:
>
>> On Sun, Mar 27, 2016 at 6:11 PM, Mike Perez  wrote:
>>
>>> On 00:40 Mar 28, Jordan Pittier wrote:
>>> > I am going to play the devil's advocate here but why can"t
>>> > python-openstackclient have its own opinion on the matter ? This CLI
>>> seems
>>> > to be for humans and humans love names/labels/tags and find UUIDS hard
>>> to
>>> > remember. Advanced users who want anonymous volumes can always hit the
>>> API
>>> > directly with curl or whatever SDK.
>>>
>>> I suppose it could, however, names are not unique.
>>>
>>
>> Names are not unique in much of OpenStack.  When ambiguity exists, we
>> exit with an error.
>>
>> Also, this works to produce a volume with no name should you absolutely
>> require it:
>>
>> openstack volume create --size 10 ""
>>
>>
>> dt
>> --
>>
>> Dean Troyer
>> dtro...@gmail.com
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
-- 
Duncan Thomas
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-28 Thread Dean Troyer
On Sun, Mar 27, 2016 at 9:44 AM, Duncan Thomas 
wrote:

> I think it is worth fixing the client to actually match the API, yes. The
> client seems to be determined not to actually match the API in lots of
> ways, e.g. https://bugs.launchpad.net/python-openstackclient/+bug/1561666
>

OSC is opinionated about what its CLI commands should look like, and one of
the strongest opinions is that they need to be consistent everywhere
possible.  To do otherwise is to continue the user-hostile CLI environment
we have provided our consumers.  It is more important for OSC to be
consistent within itself than to be consistent with other projects.

REST APIs rarely make good user interfaces, otherwise we'd all use curl as
our CLI.  They are also rarely designed to be end-user friendly.

dt

-- 

Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-28 Thread Dean Troyer
On Mon, Mar 28, 2016 at 4:29 AM, Duncan Thomas 
wrote:

> Because it leads to false assumptions, and code that breaks when something
> breaks those assumptions (e.g. somebody creates a volume with no name on
> horizon and breaks all the users of openstackclient that expects one
> because their client suggested it was mandatory
>

The only place in OSC I can find that _requires_ a name and not allow an ID
is the create commands, and as noted elsewhere, "" is a valid name in the
CLI.  In most cases we make no checks on the contents of name/ID fields and
rely on the REST API/server backend to handle problems there as required.

If you know of anything in OSC that does break due to empty name fields,
that is a bug and I'd love to know about it.

dt

-- 

Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-28 Thread Dean Troyer
On Sun, Mar 27, 2016 at 6:11 PM, Mike Perez  wrote:

> On 00:40 Mar 28, Jordan Pittier wrote:
> > I am going to play the devil's advocate here but why can"t
> > python-openstackclient have its own opinion on the matter ? This CLI
> seems
> > to be for humans and humans love names/labels/tags and find UUIDS hard to
> > remember. Advanced users who want anonymous volumes can always hit the
> API
> > directly with curl or whatever SDK.
>
> I suppose it could, however, names are not unique.
>

Names are not unique in much of OpenStack.  When ambiguity exists, we exit
with an error.

Also, this works to produce a volume with no name should you absolutely
require it:

openstack volume create --size 10 ""


dt
-- 

Dean Troyer
dtro...@gmail.com
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-28 Thread Duncan Thomas
Because it leads to false assumptions, and code that breaks when something
breaks those assumptions (e.g. somebody creates a volume with no name on
horizon and breaks all the users of openstackclient that expects one
because their client suggested it was mandatory

On 28 March 2016 at 01:40, Jordan Pittier 
wrote:

> I am going to play the devil's advocate here but why can"t
> python-openstackclient have its own opinion on the matter ? This CLI seems
> to be for humans and humans love names/labels/tags and find UUIDS hard to
> remember. Advanced users who want anonymous volumes can always hit the API
> directly with curl or whatever SDK.
>
> On Sun, Mar 27, 2016 at 4:44 PM, Duncan Thomas 
> wrote:
>
>> I think it is worth fixing the client to actually match the API, yes. The
>> client seems to be determined not to actually match the API in lots of
>> ways, e.g. https://bugs.launchpad.net/python-openstackclient/+bug/1561666
>>
>> On 24 March 2016 at 19:08, Ivan Kolodyazhny  wrote:
>>
>>> Hi team,
>>>
>>> From the Cinder point of view, both volumes, snapshots and backups APIs
>>> do not require name param. But python-openstackclient requires name param
>>> for these entities.
>>>
>>> I'm going to fix this inconsistency with patch [1]. Unfortunately, it's
>>> a bit more than changing required params to not required. We have to change
>>> CLI signatures. E.g. for create a volume: from [2].
>>>
>>> Is it acceptable? What is the right way to do such changes for OpenStack
>>> Client?
>>>
>>>
>>> [1] https://review.openstack.org/#/c/294146/
>>> [2] http://paste.openstack.org/show/491771/
>>> [3] http://paste.openstack.org/show/491772/
>>>
>>> Regards,
>>> Ivan Kolodyazhny,
>>> http://blog.e0ne.info/
>>>
>>>
>>> __
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe:
>>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>>
>>
>>
>> --
>> --
>> Duncan Thomas
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
-- 
Duncan Thomas
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-27 Thread Mike Perez
On 00:40 Mar 28, Jordan Pittier wrote:
> I am going to play the devil's advocate here but why can"t
> python-openstackclient have its own opinion on the matter ? This CLI seems
> to be for humans and humans love names/labels/tags and find UUIDS hard to
> remember. Advanced users who want anonymous volumes can always hit the API
> directly with curl or whatever SDK.

I suppose it could, however, names are not unique.

-- 
Mike Perez

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-27 Thread Jordan Pittier
I am going to play the devil's advocate here but why can"t
python-openstackclient have its own opinion on the matter ? This CLI seems
to be for humans and humans love names/labels/tags and find UUIDS hard to
remember. Advanced users who want anonymous volumes can always hit the API
directly with curl or whatever SDK.

On Sun, Mar 27, 2016 at 4:44 PM, Duncan Thomas 
wrote:

> I think it is worth fixing the client to actually match the API, yes. The
> client seems to be determined not to actually match the API in lots of
> ways, e.g. https://bugs.launchpad.net/python-openstackclient/+bug/1561666
>
> On 24 March 2016 at 19:08, Ivan Kolodyazhny  wrote:
>
>> Hi team,
>>
>> From the Cinder point of view, both volumes, snapshots and backups APIs
>> do not require name param. But python-openstackclient requires name param
>> for these entities.
>>
>> I'm going to fix this inconsistency with patch [1]. Unfortunately, it's a
>> bit more than changing required params to not required. We have to change
>> CLI signatures. E.g. for create a volume: from [2].
>>
>> Is it acceptable? What is the right way to do such changes for OpenStack
>> Client?
>>
>>
>> [1] https://review.openstack.org/#/c/294146/
>> [2] http://paste.openstack.org/show/491771/
>> [3] http://paste.openstack.org/show/491772/
>>
>> Regards,
>> Ivan Kolodyazhny,
>> http://blog.e0ne.info/
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> --
> Duncan Thomas
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [cinder][openstackclient] Required name option for volumes, snapshots and backups

2016-03-27 Thread Duncan Thomas
I think it is worth fixing the client to actually match the API, yes. The
client seems to be determined not to actually match the API in lots of
ways, e.g. https://bugs.launchpad.net/python-openstackclient/+bug/1561666

On 24 March 2016 at 19:08, Ivan Kolodyazhny  wrote:

> Hi team,
>
> From the Cinder point of view, both volumes, snapshots and backups APIs do
> not require name param. But python-openstackclient requires name param for
> these entities.
>
> I'm going to fix this inconsistency with patch [1]. Unfortunately, it's a
> bit more than changing required params to not required. We have to change
> CLI signatures. E.g. for create a volume: from [2].
>
> Is it acceptable? What is the right way to do such changes for OpenStack
> Client?
>
>
> [1] https://review.openstack.org/#/c/294146/
> [2] http://paste.openstack.org/show/491771/
> [3] http://paste.openstack.org/show/491772/
>
> Regards,
> Ivan Kolodyazhny,
> http://blog.e0ne.info/
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
-- 
Duncan Thomas
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev