/usr/lib/python2.6/site-packages/neutronclient/tests/unit
NameSizeModeActions
fw/-0755rm
lb/-0755rm
qos/-0755rm
vpn/-0755rm
test_auth.py157140644editdlrm
test_auth.pyc146260644editdlrm
test_casual_args.py49930644editdlrm
test_casual_args.pyc67810644editdlrm
test_cli20.py317060644editdlrm
test_cli20.pyc295530644editdlrm
test_cli20_address_scope.py60240644editdlrm
test_cli20_address_scope.pyc65760644editdlrm
test_cli20_agents.py30520644editdlrm
test_cli20_agents.pyc35430644editdlrm
test_cli20_agentschedulers.py86310644editdlrm
test_cli20_agentschedulers.pyc100440644editdlrm
test_cli20_credential.py33010644editdlrm
test_cli20_credential.pyc36840644editdlrm
test_cli20_extensions.py19450644editdlrm
test_cli20_extensions.pyc18340644editdlrm
test_cli20_floatingips.py62580755editdlrm
test_cli20_floatingips.pyc68750644editdlrm
test_cli20_metering.py39740644editdlrm
test_cli20_metering.pyc46700644editdlrm
test_cli20_network.py264430644editdlrm
test_cli20_network.pyc272260644editdlrm
test_cli20_networkprofile.py61860644editdlrm
test_cli20_networkprofile.pyc60110644editdlrm
test_cli20_nsx_networkgateway.py119740644editdlrm
test_cli20_nsx_networkgateway.pyc125660644editdlrm
test_cli20_nsx_queue.py31240755editdlrm
test_cli20_nsx_queue.pyc37140644editdlrm
test_cli20_nuage_netpartition.py22520644editdlrm
test_cli20_nuage_netpartition.pyc27320644editdlrm
test_cli20_policyprofile.py32990644editdlrm
test_cli20_policyprofile.pyc33050644editdlrm
test_cli20_port.py267480644editdlrm
test_cli20_port.pyc252390644editdlrm
test_cli20_rbac.py52390644editdlrm
test_cli20_rbac.pyc56330644editdlrm
test_cli20_router.py143640644editdlrm
test_cli20_router.pyc155800644editdlrm
test_cli20_securitygroup.py278470755editdlrm
test_cli20_securitygroup.pyc274200644editdlrm
test_cli20_servicetype.py22680644editdlrm
test_cli20_servicetype.pyc27680644editdlrm
test_cli20_subnet.py304020644editdlrm
test_cli20_subnet.pyc281790644editdlrm
test_cli20_subnetpool.py76030644editdlrm
test_cli20_subnetpool.pyc80940644editdlrm
test_client_extension.py92530644editdlrm
test_client_extension.pyc121790644editdlrm
test_command_meta.py14960644editdlrm
test_command_meta.pyc18480644editdlrm
test_http.py42610644editdlrm
test_http.pyc63930644editdlrm
test_name_or_id.py82410644editdlrm
test_name_or_id.pyc73990644editdlrm
test_quota.py16800755editdlrm
test_quota.pyc19510644editdlrm
test_shell.py207140644editdlrm
test_shell.pyc180830644editdlrm
test_ssl.py63030644editdlrm
test_ssl.pyc52290644editdlrm
test_utils.py43680644editdlrm
test_utils.pyc76500644editdlrm
test_validators.py41010644editdlrm
test_validators.pyc42380644editdlrm
__init__.py00644editdlrm
__init__.pyc1660644editdlrm
Edit: /usr/lib/python2.6/site-packages/neutronclient/tests/unit/test_cli20_metering.py (3974B)
# Copyright (C) 2013 eNovance SAS # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import sys from neutronclient.neutron.v2_0 import metering from neutronclient.tests.unit import test_cli20 class CLITestV20MeteringJSON(test_cli20.CLITestV20Base): def test_create_metering_label(self): """Create a metering label.""" resource = 'metering_label' cmd = metering.CreateMeteringLabel( test_cli20.MyApp(sys.stdout), None) name = 'my label' myid = 'myid' description = 'my description' args = [name, '--description', description, '--shared'] position_names = ['name', 'description', 'shared'] position_values = [name, description, True] self._test_create_resource(resource, cmd, name, myid, args, position_names, position_values) def test_list_metering_labels(self): resources = "metering_labels" cmd = metering.ListMeteringLabel( test_cli20.MyApp(sys.stdout), None) self._test_list_resources(resources, cmd) def test_delete_metering_label(self): """Delete a metering label.""" resource = 'metering_label' cmd = metering.DeleteMeteringLabel( test_cli20.MyApp(sys.stdout), None) myid = 'myid' args = [myid] self._test_delete_resource(resource, cmd, myid, args) def test_show_metering_label(self): resource = 'metering_label' cmd = metering.ShowMeteringLabel( test_cli20.MyApp(sys.stdout), None) args = ['--fields', 'id', self.test_id] self._test_show_resource(resource, cmd, self.test_id, args, ['id']) def test_create_metering_label_rule(self): resource = 'metering_label_rule' cmd = metering.CreateMeteringLabelRule( test_cli20.MyApp(sys.stdout), None) myid = 'myid' metering_label_id = 'aaa' remote_ip_prefix = '10.0.0.0/24' direction = 'ingress' args = [metering_label_id, remote_ip_prefix, '--direction', direction, '--excluded'] position_names = ['metering_label_id', 'remote_ip_prefix', 'direction', 'excluded'] position_values = [metering_label_id, remote_ip_prefix, direction, True] self._test_create_resource(resource, cmd, metering_label_id, myid, args, position_names, position_values) def test_list_metering_label_rules(self): resources = "metering_label_rules" cmd = metering.ListMeteringLabelRule( test_cli20.MyApp(sys.stdout), None) self._test_list_resources(resources, cmd) def test_delete_metering_label_rule(self): resource = 'metering_label_rule' cmd = metering.DeleteMeteringLabelRule( test_cli20.MyApp(sys.stdout), None) myid = 'myid' args = [myid] self._test_delete_resource(resource, cmd, myid, args) def test_show_metering_label_rule(self): resource = 'metering_label_rule' cmd = metering.ShowMeteringLabelRule( test_cli20.MyApp(sys.stdout), None) args = ['--fields', 'id', self.test_id] self._test_show_resource(resource, cmd, self.test_id, args, ['id']) class CLITestV20MeteringXML(CLITestV20MeteringJSON): format = 'xml'