/
usr
/
lib
/
python2.6
/
site-packages
/
novaclient
/
tests
/
unit
/
v2
/
/usr/lib/python2.6/site-packages/novaclient/tests/unit/v2
mkdir
upload
Name
Size
Mode
Actions
contrib/
-
0755
rm
fakes.py
85577
0644
edit
dl
rm
fakes.pyc
89935
0644
edit
dl
rm
testfile.txt
5
0644
edit
dl
rm
test_agents.py
3994
0644
edit
dl
rm
test_agents.pyc
4019
0644
edit
dl
rm
test_aggregates.py
5757
0644
edit
dl
rm
test_aggregates.pyc
5700
0644
edit
dl
rm
test_auth.py
14296
0644
edit
dl
rm
test_auth.pyc
13067
0644
edit
dl
rm
test_availability_zone.py
3913
0644
edit
dl
rm
test_availability_zone.pyc
4127
0644
edit
dl
rm
test_certs.py
1380
0644
edit
dl
rm
test_certs.pyc
1549
0644
edit
dl
rm
test_client.py
1534
0644
edit
dl
rm
test_client.pyc
1492
0644
edit
dl
rm
test_cloudpipe.py
1757
0644
edit
dl
rm
test_cloudpipe.pyc
2076
0644
edit
dl
rm
test_fixed_ips.py
1785
0644
edit
dl
rm
test_fixed_ips.pyc
2083
0644
edit
dl
rm
test_flavors.py
8919
0644
edit
dl
rm
test_flavors.pyc
10988
0644
edit
dl
rm
test_flavor_access.py
2381
0644
edit
dl
rm
test_flavor_access.pyc
2828
0644
edit
dl
rm
test_floating_ips.py
2275
0644
edit
dl
rm
test_floating_ips.pyc
2720
0644
edit
dl
rm
test_floating_ips_bulk.py
3094
0644
edit
dl
rm
test_floating_ips_bulk.pyc
3466
0644
edit
dl
rm
test_floating_ip_dns.py
3529
0644
edit
dl
rm
test_floating_ip_dns.pyc
4313
0644
edit
dl
rm
test_floating_ip_pools.py
1237
0644
edit
dl
rm
test_floating_ip_pools.pyc
1230
0644
edit
dl
rm
test_fping.py
2242
0644
edit
dl
rm
test_fping.pyc
3020
0644
edit
dl
rm
test_hosts.py
3144
0644
edit
dl
rm
test_hosts.pyc
4445
0644
edit
dl
rm
test_hypervisors.py
6171
0644
edit
dl
rm
test_hypervisors.pyc
5914
0644
edit
dl
rm
test_images.py
2551
0644
edit
dl
rm
test_images.pyc
3713
0644
edit
dl
rm
test_keypairs.py
3941
0644
edit
dl
rm
test_keypairs.pyc
5357
0644
edit
dl
rm
test_limits.py
3160
0644
edit
dl
rm
test_limits.pyc
3066
0644
edit
dl
rm
test_networks.py
4036
0644
edit
dl
rm
test_networks.pyc
5257
0644
edit
dl
rm
test_quotas.py
2292
0644
edit
dl
rm
test_quotas.pyc
2876
0644
edit
dl
rm
test_quota_classes.py
1421
0644
edit
dl
rm
test_quota_classes.pyc
1713
0644
edit
dl
rm
test_security_groups.py
3135
0644
edit
dl
rm
test_security_groups.pyc
4116
0644
edit
dl
rm
test_security_group_rules.py
3573
0644
edit
dl
rm
test_security_group_rules.pyc
3653
0644
edit
dl
rm
test_servers.py
31014
0644
edit
dl
rm
test_servers.pyc
36756
0644
edit
dl
rm
test_server_groups.py
2769
0644
edit
dl
rm
test_server_groups.pyc
3240
0644
edit
dl
rm
test_server_migrations.py
3433
0644
edit
dl
rm
test_server_migrations.pyc
4707
0644
edit
dl
rm
test_services.py
5126
0644
edit
dl
rm
test_services.pyc
6643
0644
edit
dl
rm
test_shell.py
110887
0644
edit
dl
rm
test_shell.pyc
137901
0644
edit
dl
rm
test_usage.py
1903
0644
edit
dl
rm
test_usage.pyc
2578
0644
edit
dl
rm
test_versions.py
3649
0644
edit
dl
rm
test_versions.pyc
3770
0644
edit
dl
rm
test_volumes.py
4021
0644
edit
dl
rm
test_volumes.pyc
5136
0644
edit
dl
rm
__init__.py
0
0644
edit
dl
rm
__init__.pyc
163
0644
edit
dl
rm
Edit:
/usr/lib/python2.6/site-packages/novaclient/tests/unit/v2/test_fixed_ips.py
(1785B)
# Copyright 2012 IBM Corp. # All Rights Reserved. # # 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. from novaclient.tests.unit.fixture_data import client from novaclient.tests.unit.fixture_data import fixedips as data from novaclient.tests.unit import utils class FixedIpsTest(utils.FixturedTestCase): data_fixture_class = data.Fixture scenarios = [('original', {'client_fixture_class': client.V1}), ('session', {'client_fixture_class': client.SessionV1})] def test_get_fixed_ip(self): info = self.cs.fixed_ips.get(fixed_ip='192.168.1.1') self.assert_called('GET', '/os-fixed-ips/192.168.1.1') self.assertEqual('192.168.1.0/24', info.cidr) self.assertEqual('192.168.1.1', info.address) self.assertEqual('foo', info.hostname) self.assertEqual('bar', info.host) def test_reserve_fixed_ip(self): body = {"reserve": None} self.cs.fixed_ips.reserve(fixed_ip='192.168.1.1') self.assert_called('POST', '/os-fixed-ips/192.168.1.1/action', body) def test_unreserve_fixed_ip(self): body = {"unreserve": None} self.cs.fixed_ips.unreserve(fixed_ip='192.168.1.1') self.assert_called('POST', '/os-fixed-ips/192.168.1.1/action', body)
Save
cmd:
run