From f4d3810c3e978382bf80e59d5d9a5dcd2485f56c Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Mon, 6 Mar 2017 14:20:20 +0900 Subject: [PATCH] command list: Move network meter appropriately 'network meter' commands are not placed alphabetically in the command list. It was due to the incorrect filename. Trivial Fix Change-Id: I7a76d3133915883cf41be8c7430def284d292d6e --- .../command-objects/{meter.rst => network-meter.rst} | 0 .../network/v2/{meter.py => network_meter.py} | 0 .../v2/{test_meter.py => test_network_meter.py} | 0 .../v2/{test_meter.py => test_network_meter.py} | 10 +++++----- setup.cfg | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) rename doc/source/command-objects/{meter.rst => network-meter.rst} (100%) rename openstackclient/network/v2/{meter.py => network_meter.py} (100%) rename openstackclient/tests/functional/network/v2/{test_meter.py => test_network_meter.py} (100%) rename openstackclient/tests/unit/network/v2/{test_meter.py => test_network_meter.py} (96%) diff --git a/doc/source/command-objects/meter.rst b/doc/source/command-objects/network-meter.rst similarity index 100% rename from doc/source/command-objects/meter.rst rename to doc/source/command-objects/network-meter.rst diff --git a/openstackclient/network/v2/meter.py b/openstackclient/network/v2/network_meter.py similarity index 100% rename from openstackclient/network/v2/meter.py rename to openstackclient/network/v2/network_meter.py diff --git a/openstackclient/tests/functional/network/v2/test_meter.py b/openstackclient/tests/functional/network/v2/test_network_meter.py similarity index 100% rename from openstackclient/tests/functional/network/v2/test_meter.py rename to openstackclient/tests/functional/network/v2/test_network_meter.py diff --git a/openstackclient/tests/unit/network/v2/test_meter.py b/openstackclient/tests/unit/network/v2/test_network_meter.py similarity index 96% rename from openstackclient/tests/unit/network/v2/test_meter.py rename to openstackclient/tests/unit/network/v2/test_network_meter.py index b393f7fa65..2b96f7a680 100644 --- a/openstackclient/tests/unit/network/v2/test_meter.py +++ b/openstackclient/tests/unit/network/v2/test_network_meter.py @@ -18,7 +18,7 @@ from mock import call from osc_lib import exceptions -from openstackclient.network.v2 import meter +from openstackclient.network.v2 import network_meter from openstackclient.tests.unit.identity.v3 import fakes as identity_fakes_v3 from openstackclient.tests.unit.network.v2 import fakes as network_fakes from openstackclient.tests.unit import utils as tests_utils @@ -62,7 +62,7 @@ class TestCreateMeter(TestMeter): self.network.create_metering_label = mock.Mock( return_value=self.new_meter) self.projects_mock.get.return_value = self.project - self.cmd = meter.CreateMeter(self.app, self.namespace) + self.cmd = network_meter.CreateMeter(self.app, self.namespace) def test_create_no_options(self): arglist = [] @@ -134,7 +134,7 @@ class TestDeleteMeter(TestMeter): meter=self.meter_list ) - self.cmd = meter.DeleteMeter(self.app, self.namespace) + self.cmd = network_meter.DeleteMeter(self.app, self.namespace) def test_delete_one_meter(self): arglist = [ @@ -235,7 +235,7 @@ class TestListMeter(TestMeter): return_value=self.meter_list ) - self.cmd = meter.ListMeter(self.app, self.namespace) + self.cmd = network_meter.ListMeter(self.app, self.namespace) def test_meter_list(self): arglist = [] @@ -274,7 +274,7 @@ class TestShowMeter(TestMeter): def setUp(self): super(TestShowMeter, self).setUp() - self.cmd = meter.ShowMeter(self.app, self.namespace) + self.cmd = network_meter.ShowMeter(self.app, self.namespace) self.network.find_metering_label = \ mock.Mock(return_value=self.new_meter) diff --git a/setup.cfg b/setup.cfg index ea4691b32e..5d8b06b721 100644 --- a/setup.cfg +++ b/setup.cfg @@ -378,10 +378,10 @@ openstack.network.v2 = network_set = openstackclient.network.v2.network:SetNetwork network_show = openstackclient.network.v2.network:ShowNetwork - network_meter_create = openstackclient.network.v2.meter:CreateMeter - network_meter_delete = openstackclient.network.v2.meter:DeleteMeter - network_meter_list = openstackclient.network.v2.meter:ListMeter - network_meter_show = openstackclient.network.v2.meter:ShowMeter + network_meter_create = openstackclient.network.v2.network_meter:CreateMeter + network_meter_delete = openstackclient.network.v2.network_meter:DeleteMeter + network_meter_list = openstackclient.network.v2.network_meter:ListMeter + network_meter_show = openstackclient.network.v2.network_meter:ShowMeter network_meter_rule_create = openstackclient.network.v2.network_meter_rule:CreateMeterRule network_meter_rule_delete = openstackclient.network.v2.network_meter_rule:DeleteMeterRule