Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_provision_two_disks_swift(self):
- deploy_conf = {
- "partitions_policy": "clean",
- "partitions": [
- {
- "id": {"type": "name", "value": "vda"},
- "size": "4000",
- "type": "disk",
- "volumes": [
- {
- "mount": "/",
- "type": "partition",
- "file_system": "ext4",
- "size": "3000"
- }
- ],
- },
- {
- "id": {"type": "name", "value": "vdb"},
- "size": "2000",
- "type": "disk",
- "volumes": [
- {
- "mount": "/home",
- "type": "partition",
- "file_system": "ext3",
- "size": "1000"
- }
- ],
- }
- ]
- }
- self.env.setup(node_template="two_disks.xml",
- deploy_config=deploy_conf,
- tenant_image='centos-7.1.1503.fpa_func_test.raw')
- node = self.env.node
- node.run_cmd('provision --data_driver ironic --deploy_driver swift',
- check_ret_code=True,
- get_fuel_log=True)
- actual = node.run_cmd('parted -l')[0]
- expected = """
- Model: Virtio Block Device (virtblk)
- Disk /dev/vda: 4295MB
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 1 1049kB 26.2MB 25.2MB primary bios_grub
- 2 26.2MB 3172MB 3146MB ext4 primary
- Model: Virtio Block Device (virtblk)
- Disk /dev/vdb: 2147MB
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 1 1049kB 26.2MB 25.2MB primary bios_grub
- 2 26.2MB 1075MB 1049MB ext3 primary
- """
- utils.assertNoDiff(expected, actual)
- node.reboot_to_hdd()
- node.wait_for_boot()
- # Set node.ssh_key to "path to tenant key"
- # (if tenant key is different than deploy key)
- node.ssh_login = "centos"
- actual = node.run_cmd('uname -a')[0]
- expected = ('Linux fpa-func-test-tenant-vm 3.10.0-229.20.1.el7.x86_64'
- ' #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64'
- ' GNU/Linux\n')
- utils.assertNoDiff(expected, actual)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement