net and network commands appear to be redundant

Bug #1152862 reported by Rafi Khardalian
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Diane Fleming
openstack-manuals
Fix Released
Medium
Dhriti Shikhar
python-novaclient
Fix Released
High
Haiwei Xu

Bug Description

Below is a list of nova client commands which begin with "net". Note that net-create and network-create, as an example, have the same description. They appear to be different functions but it's completely unclear what the difference actually is. Like commands should probably be merged but at the very least the help should be updated to clarify the differences.

    network-associate-host
                        Associate host with network.
    network-associate-project
                        Associate project with network.
    network-create Create a network.
    network-disassociate
                        network.
    network-list Print a list of available networks.
    network-show Show details about the given network.
                        Add a network interface to a baremetal node
                        List network interfaces associated with a baremetal
                        Remove a network interface from a baremetal node
    net Show a network
    net-create Create a network
    net-delete Delete a network
    net-list List networks

Revision history for this message
Rafi Khardalian (rkhardalian) wrote :

Some suggestions:

rename net-delete to network-delete
merge net with network-show
merge net-create with network-create
merge net-list with network-list

Revision history for this message
Lorin Hochstein (lorinh) wrote :

They're not actually redundant, they do different things! I suggest just dropping net-create, net-list and net. Will propose a patch.

Lorin Hochstein (lorinh)
Changed in python-novaclient:
assignee: nobody → Lorin Hochstein (lorinh)
Revision history for this message
melanie witt (melwitt) wrote :

Hi Lorin, are you still working on this bug? If not, I can unassign and triage. Thanks!

Changed in python-novaclient:
status: New → Incomplete
status: Incomplete → In Progress
Revision history for this message
Lorin Hochstein (lorinh) wrote :

No, I'm not still working on this bug, please go ahead and triage it.

Changed in python-novaclient:
assignee: Lorin Hochstein (lorinh) → nobody
Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

I am also told that they do something different. For example, I think `nova net-list` calls Nova's /os-tenant-networks while `nova network-list` calls Nova's /os-networks.

The CLI should be documented well enough that a reader can tell that the two sets of commands are different, and understand the difference. I am not sure whether this is a matter for the End User Guide or the Admin User Guide or somehow divided between them, but it should be one of those three choices.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

Also, I do not see documentation for nova's /os-tenant-networks call in the API reference.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

I am not sure, but I suppose Nova's /os-tenant-networks calls are implemented by nova/api/openstack/compute/contrib/os_tenant_networks.py's NetworkController class.

Similarly, I suppose Nova's /os-networks calls are implementedby nova/api/openstack/compute/contrib/os_networks.py's NetworkController class.

The index metohds of those two classes are similar but not identical.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

Looking at the code, it appears to me that /os-tenant-networks differs from /os-networks when Neutron is used, and the difference is that the former includes the networks of the Neutron default tenant.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

There is deficiency in the API documentation as well: /os-tenant-networks is not documented at all; in addition to being a problem in and of itself this implies that a developer does not know how that is related to /os-networks.

Revision history for this message
Mike Spreitzer (mike-spreitzer) wrote :

See https://bugs.launchpad.net/nova/+bug/1327406 for evidence that some developers of merged code were confused.

Revision history for this message
Anne Gentle (annegentle) wrote :

Let's work on the API documentation in addition. Copying bug to openstack-api-site.

Anne Gentle (annegentle)
Changed in openstack-manuals:
status: New → Confirmed
Changed in openstack-api-site:
status: New → Confirmed
Changed in openstack-manuals:
importance: Undecided → Medium
Changed in openstack-api-site:
importance: Undecided → Medium
Revision history for this message
Michael Still (mikal) wrote :

There is no code proposed for python-novaclient for this bug.

Changed in python-novaclient:
status: In Progress → New
Revision history for this message
melanie witt (melwitt) wrote :

I think this should be improved sooner than later, at the very least with better explanations in the help messages.

Changed in python-novaclient:
importance: Undecided → High
status: New → Confirmed
Changed in python-novaclient:
assignee: nobody → Haiwei Xu (xu-haiwei)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/148159
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=dfc752d725fac9580a01452334aeb610e34198ad
Submitter: Jenkins
Branch: master

commit dfc752d725fac9580a01452334aeb610e34198ad
Author: Haiwei Xu <email address hidden>
Date: Mon Jan 19 10:45:35 2015 +0900

    Change commands name from net-* to tenant-network-*

    Currently the commands of os-tenant-network API use net-*
    which may confuse users sometime. This patch changes commands
    to tenant-network-*, and marks net-* commands as DEPRECATED.

    Closes-Bug: #1152862
    Change-Id: I8c3a0be08763a6f626d7fc7cf84811ac61ccc526

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in openstack-manuals:
assignee: nobody → Dhriti Shikhar (dhritishikhar)
Michael Still (mikal)
Changed in python-novaclient:
milestone: none → 2.21.0
Michael Still (mikal)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Changed in openstack-api-site:
assignee: nobody → Diane Fleming (diane-fleming)
milestone: none → liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/185248

Changed in openstack-api-site:
status: Confirmed → In Progress
Revision history for this message
Diane Fleming (diane-fleming) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/185248
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=f1bb6e05a0a07759be3c97f88382e6bc07096f09
Submitter: Jenkins
Branch: master

commit f1bb6e05a0a07759be3c97f88382e6bc07096f09
Author: Diane Fleming <email address hidden>
Date: Sat May 23 17:07:47 2015 -0500

    Add os-networks and os-tenant-networks extensions to Compute v3

    Change-Id: I490b8529a92af532b832de5db9ff9a535cc93c50
    Closes-Bug: #1152862

Changed in openstack-api-site:
status: In Progress → Fix Released
Revision history for this message
Tom Fifield (fifieldt) wrote :

This would have been picked up in the CLI reference update for Kilo

Changed in openstack-manuals:
status: Confirmed → Fix Released
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.