From db458d7dec6b2cf712a14e54a76305258aedb700 Mon Sep 17 00:00:00 2001 From: Dean Troyer <dtroyer@gmail.com> Date: Tue, 26 Jan 2016 17:42:41 -0600 Subject: [PATCH] Use correct terminology for subnets OpenStack uses 'CIDR' incorrectly in many places. We are not going to perpetuate that usage. The correct name here is simply 'subnet' as the data is the network address for the subnet, in CIDR notation. Also, some additional cleanups as suggested in comments to https://review.openstack.org/#/c/84782 Depends-on: I3c0748074a6511ff92500516b3129886d2476eed Change-Id: Ib44c49dc1739ce7d881432e482dd16f8928eef49 --- doc/source/commands.rst | 2 +- openstackclient/network/v2/subnet.py | 4 ++-- openstackclient/tests/network/v2/test_subnet.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/source/commands.rst b/doc/source/commands.rst index 5c8ea1b2c8..fae1fa6681 100644 --- a/doc/source/commands.rst +++ b/doc/source/commands.rst @@ -116,7 +116,7 @@ referring to both Compute and Volume quotas. * ``service``: (**Identity**) a cloud service * ``service provider``: (**Identity**) a resource that consumes assertions from an ``identity provider`` * ``snapshot``: (**Volume**) a point-in-time copy of a volume -* ``subnet``: (**Network**) - a pool of private IP addresses that can be assigned to instances or other resources +* ``subnet``: (**Network**) - a contiguous range of IP addresses assigned to a network * ``token``: (**Identity**) a bearer token managed by Identity service * ``usage``: (**Compute**) display host resources being consumed * ``user``: (**Identity**) individual cloud resources users diff --git a/openstackclient/network/v2/subnet.py b/openstackclient/network/v2/subnet.py index cd0e52ffcb..627471252a 100644 --- a/openstackclient/network/v2/subnet.py +++ b/openstackclient/network/v2/subnet.py @@ -53,10 +53,10 @@ class ListSubnet(lister.Lister): data = self.app.client_manager.network.subnets() - headers = ('ID', 'Name', 'Network', 'CIDR') + headers = ('ID', 'Name', 'Network', 'Subnet') columns = ('id', 'name', 'network_id', 'cidr') if parsed_args.long: - headers += ('Project', 'DHCP', 'DNS Nameservers', + headers += ('Project', 'DHCP', 'Name Servers', 'Allocation Pools', 'Host Routes', 'IP Version', 'Gateway') columns += ('tenant_id', 'enable_dhcp', 'dns_nameservers', diff --git a/openstackclient/tests/network/v2/test_subnet.py b/openstackclient/tests/network/v2/test_subnet.py index 74b4d33283..5fca5edd99 100644 --- a/openstackclient/tests/network/v2/test_subnet.py +++ b/openstackclient/tests/network/v2/test_subnet.py @@ -34,12 +34,12 @@ class TestListSubnet(TestSubnet): 'ID', 'Name', 'Network', - 'CIDR' + 'Subnet' ) columns_long = columns + ( 'Project', 'DHCP', - 'DNS Nameservers', + 'Name Servers', 'Allocation Pools', 'Host Routes', 'IP Version',