DisplayCommandBase returns two tuples bad comment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Fix Released
|
Wishlist
|
Tang Chen |
Bug Description
The comment:
# DisplayCommandB
Is all over the test code and it is wrong. We have no DisplayCommandBase class and take_action returns a tuple, not two tuples I think. Just git rid of this garbage.
description: | updated |
Steve Martinelli (stevemar) wrote : | #1 |
Changed in python-openstackclient: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
assignee: | nobody → Terry Howe (thowe-g) |
Dean Troyer (dtroyer) wrote : | #2 |
DisplayCommandBase is a cliff class and is the common ancestor of all of the commands that return values.
The error in the comment is that it is the descentant classes of cliff.DisplayCo
If anything, the corection here is to expand the comment to be more precise, as DisplayCommandBase doesn't declare a take_action() method, but it is the ancestor of both ShowOne and Lister that both document it that way.
Terry Howe (thowe-g) wrote : | #3 |
dtroyer_zz: http://
[11:42am] dtroyer_zz: This is what expects the two tuples: http://
[11:43am] dtroyer_zz: notice in the tests how often we either coerce the tuples into lists or the lists into tuples to do the comparison
[11:45am] terrylhowe: so, deep down there is some truth to it perhaps
[11:45am] dtroyer_zz: the only thing not true is the precision that DisplayComamndBase doesn't declare take_action() itself, but the descendant classes do.
[11:45am] dtroyer_zz: feel free to make that correction.
[11:45am] dtroyer_zz: otherwise the two-tuple return is valuable information
Terry Howe (thowe-g) wrote : | #4 |
The way we have implemented it
* List generally returns a tuple which contains a tuple of columns and generator
* Show and Create return an iterator which contains a tuple of columns and tuple of data
I don't have the energy to go through all those comments and sort them.
Changed in python-openstackclient: | |
assignee: | Terry Howe (thowe-g) → nobody |
Changed in python-openstackclient: | |
assignee: | nobody → Tang Chen (tangchen) |
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master) | #5 |
Fix proposed to branch: master
Review: https:/
Changed in python-openstackclient: | |
status: | Confirmed → In Progress |
OpenStack Infra (hudson-openstack) wrote : | #6 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #7 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master) | #8 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit b9de23d906a0ba6
Author: Tang Chen <email address hidden>
Date: Sat Feb 6 09:34:51 2016 +0800
Compute: Fix DisplayCommandBase comments for cliff Command subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
columns and a generator used to generate the data.
* ShowOne.
of columns and a tuple of data
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes
inheriting from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes
inheriting from class Lister in cliff. Lister.
returns a tuple and a generator.
3. Fix all DisplayCommandBase comments for tests of classes
inheriting from class ShowOne in cliff. ShowOne.
returns two tuples.
This patch finishes step 1 in compute tests.
Change-Id: I99ab42a7de69af
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : | #9 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3c67e8dd6ed20f9
Author: Tang Chen <email address hidden>
Date: Sat Feb 6 10:30:34 2016 +0800
Compute: Fix DisplayCommandBase comments for cliff Lister subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
columns and a generator used to generate the data.
* ShowOne.
of columns and a tuple of data
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes
inheriting from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes
inheriting from class Lister in cliff. Lister.
returns a tuple and a generator.
3. Fix all DisplayCommandBase comments for tests of classes
inheriting from class ShowOne in cliff. ShowOne.
returns two tuples.
This patch finishes step 2 in compute tests.
Change-Id: Idc54ad21eaa137
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : | #10 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 23faa33b1b2914b
Author: Tang Chen <email address hidden>
Date: Sat Feb 6 10:47:56 2016 +0800
Compute: Fix DisplayCommandBase comments for cliff ShowOne subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
columns and a generator used to generate the data.
* ShowOne.
of columns and a tuple of data
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes
inheriting from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes
inheriting from class Lister in cliff. Lister.
returns a tuple and a generator.
3. Fix all DisplayCommandBase comments for tests of classes
inheriting from class ShowOne in cliff. ShowOne.
returns two tuples.
This patch finishes step 3 in compute tests.
Change-Id: I4df224ec82b5d8
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master) | #11 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #12 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #13 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master) | #14 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 43f80505cbaa094
Author: Tang Chen <email address hidden>
Date: Tue Feb 9 18:27:48 2016 +0800
Fix DisplayCommandBase comments for cliff Command subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
and a generator used to generate the data.
* ShowOne.
columns and a tuple of data.
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
from class Lister in cliff. Lister.
a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
from class ShowOne in cliff. ShowOne.
This patch finishes step 1 in all but identity tests. There are too many
such comments in identity tests. So fix them all in another patch.
Change-Id: I9849baa8141ea8
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : | #15 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit e69b88ef5254453
Author: Tang Chen <email address hidden>
Date: Tue Feb 9 17:30:39 2016 +0800
Fix DisplayCommandBase comments for cliff Lister subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
and a generator used to generate the data.
* ShowOne.
columns and a tuple of data.
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
from class Lister in cliff. Lister.
a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
from class ShowOne in cliff. ShowOne.
This patch finishes step 2 in all but identity tests. There are too many
such comments in identity tests. So fix them all in another patch.
Change-Id: I00f38d12f55abe
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : | #16 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 35833f7bd82ac5d
Author: Tang Chen <email address hidden>
Date: Tue Feb 9 21:04:49 2016 +0800
Fix DisplayCommandBase comments for cliff ShowOne subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
and a generator used to generate the data.
* ShowOne.
columns and a tuple of data.
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
from class Lister in cliff. Lister.
a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
from class ShowOne in cliff. ShowOne.
This patch finishes step 3 in all but identity tests. There are too many
such comments in identity tests. So fix them all in another patch.
Change-Id: I1afe4852069d25
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master) | #17 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #18 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #19 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : | #20 |
Fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master) | #21 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit e1feed52217012d
Author: Tang Chen <email address hidden>
Date: Wed Feb 10 19:01:52 2016 +0800
Trivial: Fix "abstractmethod" to "abstract method"
As Richard <email address hidden> has pointed out, "abstractmethod"
should be "abstract method". This is a small typo I have made
when I fix DisplayCommandBase comment bug.
Change-Id: I84f1a315889625
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : | #22 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 1225ad5f7efc91f
Author: Tang Chen <email address hidden>
Date: Wed Feb 10 19:15:37 2016 +0800
Identity: Fix DisplayCommandBase comments for cliff Command subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
and a generator used to generate the data.
* ShowOne.
columns and a tuple of data.
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
from class Lister in cliff. Lister.
a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
from class ShowOne in cliff. ShowOne.
This patch finishes step 1 in all identity tests.
Change-Id: Id7180d10c050c6
Partial-bug: #1477199
OpenStack Infra (hudson-openstack) wrote : | #23 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit d0c0cefb84b4d7a
Author: Tang Chen <email address hidden>
Date: Wed Feb 10 20:51:58 2016 +0800
Identity: Fix DisplayCommandBase comments for cliff Lister subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
and a generator used to generate the data.
* ShowOne.
columns and a tuple of data.
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
from class Lister in cliff. Lister.
a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
from class ShowOne in cliff. ShowOne.
This patch finishes step 2 in all identity tests.
Change-Id: I2929ee688b1d7a
Partial-bug: #1477199
Changed in python-openstackclient: | |
status: | In Progress → Fix Released |
OpenStack Infra (hudson-openstack) wrote : | #24 |
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit 9f71b777ac7357c
Author: Tang Chen <email address hidden>
Date: Wed Feb 10 23:11:58 2016 +0800
Identity: Fix DisplayCommandBase comments for cliff ShowOne subclass tests
As bug #1477199 describes, the wrong comment below is all over the
unit test code of OSC.
# DisplayCommandB
There is no such class named DisplayCommandBase in OSC. It is in cliff.
All OSC command classes inherit from the base classes in cliff,
class Command, class Lister and class ShowOne. It is like this:
Object
|--> Command
|--> DisplayCommandBase
|--> Lister
|--> ShowOne
take_action() is an abstract method of class Command, and generally is
overwritten by subclasses.
* Command.
* Lister.
and a generator used to generate the data.
* ShowOne.
columns and a tuple of data.
So, this problem should be fixed in 3 steps:
1. Remove all DisplayCommandBase comments for tests of classes inheriting
from class Command in cliff as it returns nothing.
2. Fix all DisplayCommandBase comments for tests of classes inheriting
from class Lister in cliff. Lister.
a generator.
3. Fix all DisplayCommandBase comments for tests of classes inheriting
from class ShowOne in cliff. ShowOne.
This patch finishes step 3 in all identity tests.
Change-Id: I1f05e833cdacd3
Closes-bug: #1477199
i'd normally close this as invalid since it only touches tests, but the amount of hate is hilariously high, so i'm confirming it.