/
usr
/
lib
/
python2.6
/
site-packages
/
novaclient
/
tests
/
functional
/
v2
/
/usr/lib/python2.6/site-packages/novaclient/tests/functional/v2
mkdir
upload
Name
Size
Mode
Actions
legacy/
-
0755
rm
fake_crypto.py
2655
0644
edit
dl
rm
fake_crypto.pyc
2172
0644
edit
dl
rm
test_consoles.py
1408
0644
edit
dl
rm
test_consoles.pyc
2215
0644
edit
dl
rm
test_extended_attributes.py
2126
0644
edit
dl
rm
test_extended_attributes.pyc
1601
0644
edit
dl
rm
test_fixedips.py
924
0644
edit
dl
rm
test_fixedips.pyc
933
0644
edit
dl
rm
test_flavor_access.py
1506
0644
edit
dl
rm
test_flavor_access.pyc
1451
0644
edit
dl
rm
test_instances.py
733
0644
edit
dl
rm
test_instances.pyc
554
0644
edit
dl
rm
test_instance_action.py
2417
0644
edit
dl
rm
test_instance_action.pyc
2611
0644
edit
dl
rm
test_keypairs.py
1894
0644
edit
dl
rm
test_keypairs.pyc
2223
0644
edit
dl
rm
test_os_services.py
1748
0644
edit
dl
rm
test_os_services.pyc
1524
0644
edit
dl
rm
test_quotas.py
2171
0644
edit
dl
rm
test_quotas.pyc
1907
0644
edit
dl
rm
test_readonly_nova.py
904
0644
edit
dl
rm
test_readonly_nova.pyc
722
0644
edit
dl
rm
test_servers.py
954
0644
edit
dl
rm
test_servers.pyc
929
0644
edit
dl
rm
test_server_groups.py
2290
0644
edit
dl
rm
test_server_groups.pyc
2186
0644
edit
dl
rm
test_trigger_crash_dump.py
5887
0644
edit
dl
rm
test_trigger_crash_dump.pyc
5594
0644
edit
dl
rm
test_virtual_interface.py
1205
0644
edit
dl
rm
test_virtual_interface.pyc
1125
0644
edit
dl
rm
test_volumes_api.py
735
0644
edit
dl
rm
test_volumes_api.pyc
559
0644
edit
dl
rm
__init__.py
0
0644
edit
dl
rm
__init__.pyc
169
0644
edit
dl
rm
Edit:
/usr/lib/python2.6/site-packages/novaclient/tests/functional/v2/test_extended_attributes.py
(2126B)
# 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 json from novaclient.tests.functional.v2.legacy import test_extended_attributes class TestExtAttrNovaClientV23(test_extended_attributes.TestExtAttrNovaClient): """Functional tests for os-extended-server-attributes, microversion 2.3""" COMPUTE_API_VERSION = "2.3" def test_extended_server_attributes(self): server, volume = self._create_server_and_attach_volume() table = self.nova('show %s' % server.id) # Check that attributes listed below exist in 'nova show' table and # they are exactly Property attributes (not an instance's name, e.g.) # The _get_value_from_the_table() will raise an exception # if attr is not a key of the table dict (first column) for attr in ['OS-EXT-SRV-ATTR:reservation_id', 'OS-EXT-SRV-ATTR:launch_index', 'OS-EXT-SRV-ATTR:ramdisk_id', 'OS-EXT-SRV-ATTR:kernel_id', 'OS-EXT-SRV-ATTR:hostname', 'OS-EXT-SRV-ATTR:root_device_name', 'OS-EXT-SRV-ATTR:user_data']: self._get_value_from_the_table(table, attr) # Check that attribute given below also exists in 'nova show' table # as a key (first column) of table dict volume_attr = self._get_value_from_the_table( table, 'os-extended-volumes:volumes_attached') # Check that 'delete_on_termination' exists as a key # of volume_attr dict self.assertIn('delete_on_termination', json.loads(volume_attr)[0])
Save
cmd:
run