summaryrefslogtreecommitdiff
path: root/novaclient/tests/unit/v2/test_usage.py
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2016-12-02 21:05:22 +0000
committerMatt Riedemann <mriedem@us.ibm.com>2016-12-02 21:05:22 +0000
commit5c4d436d216e462054d7e0e714b2e8667fb0bc4c (patch)
treedcc2be1be36b95d3d16ec5083c9400a6dc808daa /novaclient/tests/unit/v2/test_usage.py
parentf47393dbbfbf36616a8d28348d93e1368763b8c3 (diff)
Revert "Microversion 2.39 - Simple tenant usage pagination"
This reverts commit f47393dbbfbf36616a8d28348d93e1368763b8c3. The 2.39 microversion has not been merged in Nova, and this change is missing a functional test to show the support added here, which if present would have required a depends-on to the Nova change for the 2.39 support. So this needs to come back out until it's ready. Change-Id: I6b6990b9a4e1e7cfea1d2aabe5f2464614440360
Notes
Notes (review): Code-Review+2: Dan Smith <dms@danplanet.com> Workflow+1: Dan Smith <dms@danplanet.com> Code-Review+1: Diana Clarke <diana.joan.clarke@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 07 Dec 2016 02:57:28 +0000 Reviewed-on: https://review.openstack.org/406359 Project: openstack/python-novaclient Branch: refs/heads/master
Diffstat (limited to 'novaclient/tests/unit/v2/test_usage.py')
-rw-r--r--novaclient/tests/unit/v2/test_usage.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/novaclient/tests/unit/v2/test_usage.py b/novaclient/tests/unit/v2/test_usage.py
index 8c18e15..e67178b 100644
--- a/novaclient/tests/unit/v2/test_usage.py
+++ b/novaclient/tests/unit/v2/test_usage.py
@@ -73,52 +73,3 @@ class UsageTest(utils.TestCase):
73 'GET', 73 'GET',
74 "/os-simple-tenant-usage/tenantfoo?start=%s&end=%s" % 74 "/os-simple-tenant-usage/tenantfoo?start=%s&end=%s" %
75 (start, stop)) 75 (start, stop))
76
77
78class UsageV39Test(UsageTest):
79 def setUp(self):
80 super(UsageV39Test, self).setUp()
81 self.cs.api_version = api_versions.APIVersion('2.39')
82
83 def test_usage_list_with_paging(self):
84 now = datetime.datetime.now()
85 usages = self.cs.usage.list(now, now, marker='some-uuid', limit=3)
86 self.assert_request_id(usages, fakes.FAKE_REQUEST_ID_LIST)
87
88 self.cs.assert_called(
89 'GET',
90 '/os-simple-tenant-usage?' +
91 ('start=%s&' % now.isoformat()) +
92 ('end=%s&' % now.isoformat()) +
93 ('limit=3&marker=some-uuid&detailed=0'))
94 for u in usages:
95 self.assertIsInstance(u, usage.Usage)
96
97 def test_usage_list_detailed_with_paging(self):
98 now = datetime.datetime.now()
99 usages = self.cs.usage.list(
100 now, now, detailed=True, marker='some-uuid', limit=3)
101 self.assert_request_id(usages, fakes.FAKE_REQUEST_ID_LIST)
102
103 self.cs.assert_called(
104 'GET',
105 '/os-simple-tenant-usage?' +
106 ('start=%s&' % now.isoformat()) +
107 ('end=%s&' % now.isoformat()) +
108 ('limit=3&marker=some-uuid&detailed=1'))
109 for u in usages:
110 self.assertIsInstance(u, usage.Usage)
111
112 def test_usage_get_with_paging(self):
113 now = datetime.datetime.now()
114 u = self.cs.usage.get(
115 'tenantfoo', now, now, marker='some-uuid', limit=3)
116 self.assert_request_id(u, fakes.FAKE_REQUEST_ID_LIST)
117
118 self.cs.assert_called(
119 'GET',
120 '/os-simple-tenant-usage/tenantfoo?' +
121 ('start=%s&' % now.isoformat()) +
122 ('end=%s&' % now.isoformat()) +
123 ('limit=3&marker=some-uuid'))
124 self.assertIsInstance(u, usage.Usage)