diff options
| author | Zuul <zuul@review.opendev.org> | 2020-10-13 12:21:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-10-13 12:21:15 +0000 |
| commit | 375fe315255535ad0a6451aa0d9270ca5c3ba3b9 (patch) | |
| tree | 82a1052b8a7df8d89305681dc56c04dffa9c4eaa /openstackclient/tests/unit/network/v2 | |
| parent | 1a0bf014979df54e6556c04fa4d08072032b7d3f (diff) | |
| parent | 58f1c90971969ee12089c2e5aeea4993d8c095d9 (diff) | |
| download | python-openstackclient-375fe315255535ad0a6451aa0d9270ca5c3ba3b9.tar.gz | |
Merge "Add source_ip_prefix and destination_ip_prefix to metering label rules"
Diffstat (limited to 'openstackclient/tests/unit/network/v2')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/fakes.py | 2 | ||||
| -rw-r--r-- | openstackclient/tests/unit/network/v2/test_network_meter_rule.py | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py index 74001375..2db83d3b 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -1591,6 +1591,8 @@ class FakeNetworkMeterRule(object): 'excluded': False, 'metering_label_id': 'meter-label-id-' + uuid.uuid4().hex, 'remote_ip_prefix': '10.0.0.0/24', + 'source_ip_prefix': '8.8.8.8/32', + 'destination_ip_prefix': '10.0.0.0/24', 'tenant_id': 'project-id-' + uuid.uuid4().hex, } diff --git a/openstackclient/tests/unit/network/v2/test_network_meter_rule.py b/openstackclient/tests/unit/network/v2/test_network_meter_rule.py index 8f8922c0..e9224fa6 100644 --- a/openstackclient/tests/unit/network/v2/test_network_meter_rule.py +++ b/openstackclient/tests/unit/network/v2/test_network_meter_rule.py @@ -42,20 +42,24 @@ class TestCreateMeterRule(TestMeterRule): ) columns = ( + 'destination_ip_prefix', 'direction', 'excluded', 'id', 'metering_label_id', 'project_id', 'remote_ip_prefix', + 'source_ip_prefix', ) data = ( + new_rule.destination_ip_prefix, new_rule.direction, new_rule.excluded, new_rule.id, new_rule.metering_label_id, new_rule.project_id, new_rule.remote_ip_prefix, + new_rule.source_ip_prefix, ) def setUp(self): @@ -228,6 +232,8 @@ class TestListMeterRule(TestMeterRule): 'Excluded', 'Direction', 'Remote IP Prefix', + 'Source IP Prefix', + 'Destination IP Prefix' ) data = [] @@ -238,6 +244,8 @@ class TestListMeterRule(TestMeterRule): rule.excluded, rule.direction, rule.remote_ip_prefix, + rule.source_ip_prefix, + rule.destination_ip_prefix )) def setUp(self): @@ -270,21 +278,25 @@ class TestShowMeterRule(TestMeterRule): ) columns = ( + 'destination_ip_prefix', 'direction', 'excluded', 'id', 'metering_label_id', 'project_id', 'remote_ip_prefix', + 'source_ip_prefix', ) data = ( + new_rule.destination_ip_prefix, new_rule.direction, new_rule.excluded, new_rule.id, new_rule.metering_label_id, new_rule.project_id, new_rule.remote_ip_prefix, + new_rule.source_ip_prefix, ) def setUp(self): |
