This is an automated email from the ASF dual-hosted git repository. tomaz pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 0c4775f1afc132d0b7dc2aef6fd218f334b67574 Author: Tomaz Muraus <to...@tomaz.me> AuthorDate: Sat Jun 29 11:52:44 2024 +0200 Change fixture directory name (openstack_v1.1 -> openstack_v1_1) so it's a valid Python package name and works with new setuptools package discovery mechanism. --- .../{openstack_v1.1 => openstack_v1_1}/README | 0 .../_flavor_extra_specs.json | 0 .../_flavors_7.json | 0 .../_flavors_detail.json | 0 .../_floating_ip.json | 0 .../_floating_ip_pools.json | 0 .../_floating_ips.json | 0 .../_images_13.json | 0 ...mages_4949f9ee_2421_4c81_8b49_13119446008b.json | 0 ...f1a54e_a1b2_4df8_b747_4bec97abc799_members.json | 0 ...f1a54e_a1b2_4df8_b747_4bec97abc799_members.json | 0 ...a9cd9a_278a_444c_90a6_d24b8c688a63_members.json | 0 ...3_members_016926dff12345e8b10329f24c99745b.json | 0 .../_images_detail.json | 0 ...mages_f24a3c1b-d52a-4116-91da-25b3eee8f55d.json | 0 ...mages_f24a3c1b-d52a-4116-91da-25b3eee8f55e.json | 0 .../_images_v2.json | 0 .../_images_v2_invalid_next.json | 0 .../_images_v2_page2.json | 0 .../_os_keypairs.json | 0 .../_os_keypairs_create.json | 0 .../_os_keypairs_create_import.json | 0 .../_os_keypairs_get_one.json | 0 .../_os_keypairs_not_found.json | 0 .../_os_networks.json | 0 .../_os_networks_POST.json | 0 .../_os_quota_sets_aTenantId.json | 0 .../_os_security_group_rules_create.json | 0 .../_os_security_groups.json | 0 .../_os_security_groups_create.json | 0 .../_os_snapshot.json | 0 .../_os_snapshot_rackspace.json | 0 .../_os_snapshots.json | 0 .../_os_snapshots_create.json | 0 .../_os_snapshots_create_rackspace.json | 0 .../_os_snapshots_rackspace.json | 0 .../_os_volumes.json | 0 ...lumes_cd76a3a1_c4ce_40f6_9b9f_07a61508938d.json | 0 .../_os_volumes_create.json | 0 .../_port_v2.json | 0 .../_ports_v2.json | 0 .../_servers.json | 0 .../_servers_12063_metadata_two_keys.json | 0 .../_servers_12064.json | 0 .../_servers_12064247.json | 0 .../_servers_12064_updated_name_bob.json | 0 .../_servers_12065_os_volume_attachments.json | 0 .../_servers_12086_console_output.json | 0 ...-4937-8f03-ac676d6234be_os-security-groups.json | 0 ...rvers_26f7fbee_8ce1_4c28_887a_bfe8e4bb10fe.json | 0 .../_servers_create.json | 0 .../_servers_create_disk_config.json | 0 .../_servers_detail.json | 0 .../_servers_detail_EMPTY.json | 0 .../_servers_detail_ERROR_STATE.json | 0 .../_servers_os_intefaces.json | 0 .../_servers_pause.json | 0 .../_servers_resume.json | 0 .../_servers_suspend.json | 0 .../_servers_unpause.json | 0 .../_v2_0__floatingip.json | 0 .../_v2_0__floatingips.json | 0 .../_v2_0__floatingips_ip_id.json | 0 .../_v2_0__floatingips_net_id.json | 0 .../_v2_0__network.json | 0 .../_v2_0__network_no_tags.json | 0 .../_v2_0__network_quota.json | 0 .../_v2_0__networks.json | 0 .../_v2_0__networks_POST.json | 0 .../_v2_0__networks_public.json | 0 .../_v2_0__os_server_group.json | 0 .../_v2_0__os_server_groups.json | 0 .../_v2_0__quota_set.json | 0 .../_v2_0__router.json | 0 .../_v2_0__router_interface.json | 0 .../_v2_0__routers.json | 0 .../_v2_0__security_group.json | 0 .../_v2_0__security_group_rule.json | 0 .../_v2_0__security_groups.json | 0 .../_v2_0__snapshot.json | 0 .../_v2_0__snapshots.json | 0 .../_v2_0__snapshots_paginate_start.json | 0 .../_v2_0__subnet.json | 0 .../_v2_0__subnets.json | 0 .../_v2_0__volume.json | 0 ...olume_abc6a3a1_c4ce_40f6_9b9f_07a61508938d.json | 0 .../_v2_0__volumes.json | 0 .../_v3_0__volume_quota.json | 0 .../delete_floating_ip_167_138_123_111.json | 0 libcloud/test/compute/test_openstack.py | 142 ++++++++++++++++++++- pyproject.toml | 1 + 91 files changed, 142 insertions(+), 1 deletion(-) diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/README b/libcloud/test/compute/fixtures/openstack_v1_1/README similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/README rename to libcloud/test/compute/fixtures/openstack_v1_1/README diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_flavor_extra_specs.json b/libcloud/test/compute/fixtures/openstack_v1_1/_flavor_extra_specs.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_flavor_extra_specs.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_flavor_extra_specs.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_flavors_7.json b/libcloud/test/compute/fixtures/openstack_v1_1/_flavors_7.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_flavors_7.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_flavors_7.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_flavors_detail.json b/libcloud/test/compute/fixtures/openstack_v1_1/_flavors_detail.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_flavors_detail.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_flavors_detail.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_floating_ip.json b/libcloud/test/compute/fixtures/openstack_v1_1/_floating_ip.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_floating_ip.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_floating_ip.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_floating_ip_pools.json b/libcloud/test/compute/fixtures/openstack_v1_1/_floating_ip_pools.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_floating_ip_pools.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_floating_ip_pools.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_floating_ips.json b/libcloud/test/compute/fixtures/openstack_v1_1/_floating_ips.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_floating_ips.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_floating_ips.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_13.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_13.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_13.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_13.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_4949f9ee_2421_4c81_8b49_13119446008b.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_4949f9ee_2421_4c81_8b49_13119446008b.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_4949f9ee_2421_4c81_8b49_13119446008b.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_4949f9ee_2421_4c81_8b49_13119446008b.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_8af1a54e_a1b2_4df8_b747_4bec97abc799_members.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_8af1a54e_a1b2_4df8_b747_4bec97abc799_members.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_8af1a54e_a1b2_4df8_b747_4bec97abc799_members.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_8af1a54e_a1b2_4df8_b747_4bec97abc799_members.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_9af1a54e_a1b2_4df8_b747_4bec97abc799_members.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_9af1a54e_a1b2_4df8_b747_4bec97abc799_members.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_9af1a54e_a1b2_4df8_b747_4bec97abc799_members.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_9af1a54e_a1b2_4df8_b747_4bec97abc799_members.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members_016926dff12345e8b10329f24c99745b.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members_016926dff12345e8b10329f24c99745b.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members_016926dff12345e8b10329f24c99745b.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members_016926dff12345e8b10329f24c99745b.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_detail.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_detail.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_detail.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_detail.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55d.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55d.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55d.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55d.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55e.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55e.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55e.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_f24a3c1b-d52a-4116-91da-25b3eee8f55e.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_v2.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_v2.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_v2.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_v2.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_v2_invalid_next.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_v2_invalid_next.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_v2_invalid_next.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_v2_invalid_next.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_images_v2_page2.json b/libcloud/test/compute/fixtures/openstack_v1_1/_images_v2_page2.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_images_v2_page2.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_images_v2_page2.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_create.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_create.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_create.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_create.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_create_import.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_create_import.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_create_import.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_create_import.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_get_one.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_get_one.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_get_one.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_get_one.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_not_found.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_not_found.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_keypairs_not_found.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_keypairs_not_found.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_networks.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_networks.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_networks.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_networks.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_networks_POST.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_networks_POST.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_networks_POST.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_networks_POST.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_quota_sets_aTenantId.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_quota_sets_aTenantId.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_quota_sets_aTenantId.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_quota_sets_aTenantId.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_security_group_rules_create.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_security_group_rules_create.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_security_group_rules_create.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_security_group_rules_create.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_security_groups.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_security_groups.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_security_groups.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_security_groups.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_security_groups_create.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_security_groups_create.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_security_groups_create.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_security_groups_create.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshot.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshot.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshot.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshot.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshot_rackspace.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshot_rackspace.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshot_rackspace.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshot_rackspace.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots_create.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots_create.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots_create.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots_create.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots_create_rackspace.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots_create_rackspace.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots_create_rackspace.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots_create_rackspace.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots_rackspace.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots_rackspace.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_snapshots_rackspace.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_snapshots_rackspace.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_volumes.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_volumes.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_volumes.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_volumes.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_volumes_cd76a3a1_c4ce_40f6_9b9f_07a61508938d.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_volumes_cd76a3a1_c4ce_40f6_9b9f_07a61508938d.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_volumes_cd76a3a1_c4ce_40f6_9b9f_07a61508938d.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_volumes_cd76a3a1_c4ce_40f6_9b9f_07a61508938d.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_os_volumes_create.json b/libcloud/test/compute/fixtures/openstack_v1_1/_os_volumes_create.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_os_volumes_create.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_os_volumes_create.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_port_v2.json b/libcloud/test/compute/fixtures/openstack_v1_1/_port_v2.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_port_v2.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_port_v2.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_ports_v2.json b/libcloud/test/compute/fixtures/openstack_v1_1/_ports_v2.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_ports_v2.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_ports_v2.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_12063_metadata_two_keys.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_12063_metadata_two_keys.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_12063_metadata_two_keys.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_12063_metadata_two_keys.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_12064.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_12064.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_12064.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_12064.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_12064247.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_12064247.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_12064247.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_12064247.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_12064_updated_name_bob.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_12064_updated_name_bob.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_12064_updated_name_bob.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_12064_updated_name_bob.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_12065_os_volume_attachments.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_12065_os_volume_attachments.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_12065_os_volume_attachments.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_12065_os_volume_attachments.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_12086_console_output.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_12086_console_output.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_12086_console_output.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_12086_console_output.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_1c01300f-ef97-4937-8f03-ac676d6234be_os-security-groups.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_1c01300f-ef97-4937-8f03-ac676d6234be_os-security-groups.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_1c01300f-ef97-4937-8f03-ac676d6234be_os-security-groups.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_1c01300f-ef97-4937-8f03-ac676d6234be_os-security-groups.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_26f7fbee_8ce1_4c28_887a_bfe8e4bb10fe.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_26f7fbee_8ce1_4c28_887a_bfe8e4bb10fe.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_26f7fbee_8ce1_4c28_887a_bfe8e4bb10fe.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_26f7fbee_8ce1_4c28_887a_bfe8e4bb10fe.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_create.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_create.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_create.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_create.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_create_disk_config.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_create_disk_config.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_create_disk_config.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_create_disk_config.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_detail.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_detail.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_detail.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_detail.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_detail_EMPTY.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_detail_EMPTY.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_detail_EMPTY.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_detail_EMPTY.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_detail_ERROR_STATE.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_detail_ERROR_STATE.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_detail_ERROR_STATE.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_detail_ERROR_STATE.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_os_intefaces.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_os_intefaces.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_os_intefaces.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_os_intefaces.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_pause.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_pause.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_pause.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_pause.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_resume.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_resume.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_resume.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_resume.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_suspend.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_suspend.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_suspend.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_suspend.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_servers_unpause.json b/libcloud/test/compute/fixtures/openstack_v1_1/_servers_unpause.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_servers_unpause.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_servers_unpause.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingip.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingip.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingip.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingip.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingips.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingips.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips_ip_id.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingips_ip_id.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips_ip_id.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingips_ip_id.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips_net_id.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingips_net_id.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips_net_id.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__floatingips_net_id.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__network.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__network.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__network.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__network.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__network_no_tags.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__network_no_tags.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__network_no_tags.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__network_no_tags.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__network_quota.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__network_quota.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__network_quota.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__network_quota.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__networks.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__networks.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__networks.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__networks.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__networks_POST.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__networks_POST.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__networks_POST.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__networks_POST.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__networks_public.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__networks_public.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__networks_public.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__networks_public.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__os_server_group.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__os_server_group.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__os_server_group.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__os_server_group.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__os_server_groups.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__os_server_groups.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__os_server_groups.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__os_server_groups.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__quota_set.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__quota_set.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__quota_set.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__quota_set.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__router.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__router.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__router.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__router.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__router_interface.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__router_interface.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__router_interface.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__router_interface.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__routers.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__routers.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__routers.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__routers.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__security_group.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__security_group.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__security_group.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__security_group.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__security_group_rule.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__security_group_rule.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__security_group_rule.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__security_group_rule.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__security_groups.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__security_groups.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__security_groups.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__security_groups.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__snapshot.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__snapshot.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__snapshot.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__snapshot.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__snapshots.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__snapshots.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__snapshots.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__snapshots.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__snapshots_paginate_start.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__snapshots_paginate_start.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__snapshots_paginate_start.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__snapshots_paginate_start.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__subnet.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__subnet.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__subnet.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__subnet.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__subnets.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__subnets.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__subnets.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__subnets.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__volume.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__volume.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__volume.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__volume.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__volume_abc6a3a1_c4ce_40f6_9b9f_07a61508938d.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__volume_abc6a3a1_c4ce_40f6_9b9f_07a61508938d.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__volume_abc6a3a1_c4ce_40f6_9b9f_07a61508938d.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__volume_abc6a3a1_c4ce_40f6_9b9f_07a61508938d.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__volumes.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__volumes.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__volumes.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v2_0__volumes.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v3_0__volume_quota.json b/libcloud/test/compute/fixtures/openstack_v1_1/_v3_0__volume_quota.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/_v3_0__volume_quota.json rename to libcloud/test/compute/fixtures/openstack_v1_1/_v3_0__volume_quota.json diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/delete_floating_ip_167_138_123_111.json b/libcloud/test/compute/fixtures/openstack_v1_1/delete_floating_ip_167_138_123_111.json similarity index 100% rename from libcloud/test/compute/fixtures/openstack_v1.1/delete_floating_ip_167_138_123_111.json rename to libcloud/test/compute/fixtures/openstack_v1_1/delete_floating_ip_167_138_123_111.json diff --git a/libcloud/test/compute/test_openstack.py b/libcloud/test/compute/test_openstack.py index 51506995b..4fcf08c75 100644 --- a/libcloud/test/compute/test_openstack.py +++ b/libcloud/test/compute/test_openstack.py @@ -126,6 +126,7 @@ class OpenStack_1_0_Tests(TestCaseMixin, unittest.TestCase): def create_driver(self): if self is not OpenStack_1_0_FactoryMethodTests: self.driver_type = self.driver_klass + return self.driver_type(*self.driver_args, **self.driver_kwargs) def setUp(self): @@ -162,6 +163,7 @@ class OpenStack_1_0_Tests(TestCaseMixin, unittest.TestCase): osa.authenticate = mocked_auth_method # Valid token returned on first call, should be reused. + for i in range(0, count): con._populate_hosts_and_request_paths() @@ -324,6 +326,7 @@ class OpenStack_1_0_Tests(TestCaseMixin, unittest.TestCase): "minRam": "256", }, } + for ret_idx, extra in list(expected.items()): for key, value in list(extra.items()): self.assertEqual(ret[ret_idx].extra[key], value) @@ -562,6 +565,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): "x-storage-token": "FE011C19-CF86-4F87-BE5D-9229145D7A06", "x-storage-url": "https://storage4.clouddrive.com/v1/MossoCloudFS_FE011C19-CF86-4F87-BE5D-9229145D7A06", } + return (httplib.NO_CONTENT, "", headers, httplib.responses[httplib.NO_CONTENT]) def _v1_0_UNAUTHORIZED(self, method, url, body, headers): @@ -577,6 +581,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_0_slug_images_detail_NO_MESSAGE_IN_ERROR_BODY(self, method, url, body, headers): body = self.fixtures.load("300_multiple_choices.json") + return ( httplib.MULTIPLE_CHOICES, body, @@ -590,10 +595,12 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): "x-auth-tokenx": "FE011C19-CF86-4F87-BE5D-9229145D7A06", "x-cdn-management-url": "https://cdn.clouddrive.com/v1/MossoCloudFS_FE011C19-CF86-4F87-BE5D-9229145D7A06", } + return (httplib.NO_CONTENT, "", headers, httplib.responses[httplib.NO_CONTENT]) def _v2_0_tokens(self, method, url, body, headers): body = self.auth_fixtures.load("_v2_0__auth.json") + return ( httplib.OK, body, @@ -603,14 +610,17 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_0_slug_servers_detail_EMPTY(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers_detail_empty.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_servers_detail(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers_detail.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_servers_detail_METADATA(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers_detail_metadata.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_servers_detail_UNAUTHORIZED(self, method, url, body, headers): @@ -621,6 +631,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): raise NotImplementedError() # this is currently used for deletion of an image # as such it should not accept GET/POST + return (httplib.NO_CONTENT, "", {}, httplib.responses[httplib.NO_CONTENT]) def _v1_0_slug_images(self, method, url, body, headers): @@ -629,6 +640,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): # this is currently used for creation of new image with # POST request, don't handle GET to avoid possible confusion body = self.fixtures.load("v1_slug_images_post.xml") + return ( httplib.ACCEPTED, body, @@ -641,6 +653,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): raise ValueError("Invalid method: %s" % (method)) body = self.fixtures.load("v1_slug_images_detail.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_images_detail_invalid_next(self, method, url, body, headers): @@ -648,10 +661,12 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): raise ValueError("Invalid method: %s" % (method)) body = self.fixtures.load("v1_slug_images_detail.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_servers(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers.xml") + return ( httplib.ACCEPTED, body, @@ -661,6 +676,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_0_slug_servers_NO_ADMIN_PASS(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers_no_admin_pass.xml") + return ( httplib.ACCEPTED, body, @@ -674,6 +690,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): body = u(body) self.assertTrue(body.find('sharedIpGroupId="12345"') != -1) body = self.fixtures.load("v1_slug_servers.xml") + return ( httplib.ACCEPTED, body, @@ -683,6 +700,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_0_slug_servers_METADATA(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers_metadata.xml") + return ( httplib.ACCEPTED, body, @@ -695,10 +713,12 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): raise NotImplementedError() # only used by reboot() right now, but we will need to parse body # someday !!!! + return (httplib.ACCEPTED, "", {}, httplib.responses[httplib.ACCEPTED]) def _v1_0_slug_limits(self, method, url, body, headers): body = self.fixtures.load("v1_slug_limits.xml") + return ( httplib.ACCEPTED, body, @@ -710,15 +730,18 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): if method != "DELETE": raise NotImplementedError() # only used by destroy node() + return (httplib.ACCEPTED, "", {}, httplib.responses[httplib.ACCEPTED]) def _v1_0_slug_servers_72258_ips(self, method, url, body, headers): body = self.fixtures.load("v1_slug_servers_ips.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_shared_ip_groups_5467(self, method, url, body, headers): if method != "DELETE": raise NotImplementedError() + return (httplib.NO_CONTENT, "", {}, httplib.responses[httplib.NO_CONTENT]) def _v1_0_slug_shared_ip_groups(self, method, url, body, headers): @@ -726,10 +749,12 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): "v1_slug_shared_ip_group.xml" if method == "POST" else "v1_slug_shared_ip_groups.xml" ) body = self.fixtures.load(fixture) + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_shared_ip_groups_detail(self, method, url, body, headers): body = self.fixtures.load("v1_slug_shared_ip_groups_detail.xml") + return (httplib.OK, body, XML_HEADERS, httplib.responses[httplib.OK]) def _v1_0_slug_servers_3445_ips_public_67_23_21_133(self, method, url, body, headers): @@ -737,8 +762,10 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_0_slug_servers_444222_action(self, method, url, body, headers): body = u(body) + if body.find("resize") != -1: # test_ex_resize_server + if body.find("personality") != -1: return httplib.BAD_REQUEST else: @@ -750,6 +777,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): ) elif body.find("confirmResize") != -1: # test_ex_confirm_resize + return ( httplib.NO_CONTENT, "", @@ -758,6 +786,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): ) elif body.find("revertResize") != -1: # test_ex_revert_resize + return ( httplib.NO_CONTENT, "", @@ -769,10 +798,12 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): body = self.fixtures.load("v1_slug_flavors_detail.xml") headers = {"date": "Tue, 14 Jun 2011 09:43:55 GMT", "content-length": "529"} headers.update(XML_HEADERS) + return (httplib.OK, body, headers, httplib.responses[httplib.OK]) def _v1_1_auth(self, method, url, body, headers): body = self.auth_fixtures.load("_v1_1__auth.json") + return ( httplib.OK, body, @@ -782,6 +813,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_1_auth_UNAUTHORIZED(self, method, url, body, headers): body = self.auth_fixtures.load("_v1_1__auth_unauthorized.json") + return ( httplib.UNAUTHORIZED, body, @@ -791,6 +823,7 @@ class OpenStackMockHttp(MockHttp, unittest.TestCase): def _v1_1_auth_UNAUTHORIZED_MISSING_KEY(self, method, url, body, headers): body = self.auth_fixtures.load("_v1_1__auth_mssing_token.json") + return ( httplib.OK, body, @@ -820,6 +853,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin): def create_driver(self): if self is not OpenStack_1_1_FactoryMethodTests: self.driver_type = self.driver_klass + return self.driver_type(*self.driver_args, **self.driver_kwargs) def setUp(self): @@ -1085,6 +1119,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin): self.assertTrue(isinstance(size.swap, int)) self.assertTrue(isinstance(size.ephemeral_disk, int) or size.ephemeral_disk is None) self.assertTrue(isinstance(size.extra, dict)) + if size.id == "1": self.assertEqual(size.ephemeral_disk, 40) self.assertEqual( @@ -1881,6 +1916,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin): volume = self.driver.list_volumes()[0] # rackspace needs a different mocked response for snapshots, but not for volumes + if self.driver_type.type == "rackspace": self.conn_class.type = "RACKSPACE" @@ -1890,6 +1926,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin): def test_create_volume_snapshot(self): volume = self.driver.list_volumes()[0] + if self.driver_type.type == "rackspace": self.conn_class.type = "RACKSPACE" @@ -1900,6 +1937,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin): def test_ex_create_snapshot(self): volume = self.driver.list_volumes()[0] + if self.driver_type.type == "rackspace": self.conn_class.type = "RACKSPACE" @@ -2521,12 +2559,13 @@ class OpenStack_1_1_FactoryMethodTests(OpenStack_1_1_Tests): class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): - fixtures = ComputeFileFixtures("openstack_v1.1") + fixtures = ComputeFileFixtures("openstack_v1_1") auth_fixtures = OpenStackFixtures() json_content_headers = {"content-type": "application/json; charset=UTF-8"} def _v2_0_tokens(self, method, url, body, headers): body = self.auth_fixtures.load("_v2_0__auth.json") + return ( httplib.OK, body, @@ -2539,10 +2578,12 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): "x-auth-token": "FE011C19-CF86-4F87-BE5D-9229145D7A06", "x-server-management-url": "https://api.example.com/v1.1/slug", } + return (httplib.NO_CONTENT, "", headers, httplib.responses[httplib.NO_CONTENT]) def _v1_1_slug_servers_detail(self, method, url, body, headers): body = self.fixtures.load("_servers_detail.json") + return ( httplib.OK, body, @@ -2552,6 +2593,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_detail_ERROR_STATE_NO_IMAGE_ID(self, method, url, body, headers): body = self.fixtures.load("_servers_detail_ERROR_STATE.json") + return ( httplib.OK, body, @@ -2567,6 +2609,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_flavors_detail(self, method, url, body, headers): body = self.fixtures.load("_flavors_detail.json") + return ( httplib.OK, body, @@ -2576,6 +2619,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_images_detail(self, method, url, body, headers): body = self.fixtures.load("_images_detail.json") + return ( httplib.OK, body, @@ -2620,6 +2664,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12064_action(self, method, url, body, headers): if method != "POST": self.fail("HTTP method other than POST to action URL") + if "createImage" in json.loads(body): return ( httplib.ACCEPTED, @@ -2642,6 +2687,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12066_action(self, method, url, body, headers): if method != "POST": self.fail("HTTP method other than POST to action URL") + if "rebuild" not in json.loads(body): self.fail("Did not get expected action (rebuild) in action URL") @@ -2661,6 +2707,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12064(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_servers_12064.json") + return ( httplib.OK, body, @@ -2669,6 +2716,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "PUT": body = self.fixtures.load("_servers_12064_updated_name_bob.json") + return ( httplib.OK, body, @@ -2683,6 +2731,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12062(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_servers_12064.json") + return ( httplib.OK, body, @@ -2693,6 +2742,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12064247(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_servers_12064247.json") + return ( httplib.OK, body, @@ -2703,6 +2753,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12063_metadata(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_servers_12063_metadata_two_keys.json") + return ( httplib.OK, body, @@ -2711,6 +2762,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "PUT": body = self.fixtures.load("_servers_12063_metadata_two_keys.json") + return ( httplib.OK, body, @@ -2723,6 +2775,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): body = u(body) self.assertTrue(body.find('"OS-DCF:diskConfig": "AUTO"')) body = self.fixtures.load("_servers_create_disk_config.json") + return ( httplib.OK, body, @@ -2739,6 +2792,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ] self.assertEqual(json.loads(body)["server"]["personality"], personality) body = self.fixtures.load("_servers_create.json") + return ( httplib.OK, body, @@ -2751,6 +2805,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): body = u(body) self.assertNotIn('"personality"', body) body = self.fixtures.load("_servers_create.json") + return ( httplib.OK, body, @@ -2761,6 +2816,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_flavors_7(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_flavors_7.json") + return ( httplib.OK, body, @@ -2773,6 +2829,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_images_13(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_images_13.json") + return ( httplib.OK, body, @@ -2785,6 +2842,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_images_f24a3c1b_d52a_4116_91da_25b3eee8f55e(self, method, url, body, headers): if method == "GET" or method == "PATCH": body = self.fixtures.load("_images_f24a3c1b-d52a-4116-91da-25b3eee8f55e.json") + return ( httplib.OK, body, @@ -2799,6 +2857,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members.json") + return ( httplib.OK, body, @@ -2813,6 +2872,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "POST": body = self.fixtures.load("_images_9af1a54e_a1b2_4df8_b747_4bec97abc799_members.json") + return ( httplib.OK, body, @@ -2827,6 +2887,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "PUT": body = self.fixtures.load("_images_8af1a54e_a1b2_4df8_b747_4bec97abc799_members.json") + return ( httplib.OK, body, @@ -2843,6 +2904,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): body = self.fixtures.load( "_images_d9a9cd9a_278a_444c_90a6_d24b8c688a63_members_016926dff12345e8b10329f24c99745b.json" ) + return ( httplib.OK, body, @@ -2855,11 +2917,13 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_images(self, method, url, body, headers): if method == "GET": # 2nd (and last) page of images + if "marker=e7a40226-3523-4f0f-87d8-d8dc91bbf4a3" in url: body = self.fixtures.load("_images_v2_page2.json") else: # first page of images body = self.fixtures.load("_images_v2.json") + return ( httplib.OK, body, @@ -2872,6 +2936,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_images_invalid_next(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_images_v2_invalid_next.json") + return ( httplib.OK, body, @@ -2890,6 +2955,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_images_4949f9ee_2421_4c81_8b49_13119446008b(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_images_4949f9ee_2421_4c81_8b49_13119446008b.json") + return ( httplib.OK, body, @@ -2902,6 +2968,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_images_4949f9ee_2421_4c81_8b49_13119446008b(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_images_f24a3c1b-d52a-4116-91da-25b3eee8f55d.json") + return ( httplib.OK, body, @@ -2914,6 +2981,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_ports(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_ports_v2.json") + return ( httplib.OK, body, @@ -2922,6 +2990,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "POST": body = self.fixtures.load("_port_v2.json") + return ( httplib.OK, body, @@ -2936,6 +3005,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): return (httplib.NO_CONTENT, "", {}, httplib.responses[httplib.NO_CONTENT]) elif method == "GET": body = self.fixtures.load("_port_v2.json") + return ( httplib.OK, body, @@ -2945,6 +3015,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): elif method == "PUT": if body: body = self.fixtures.load("_port_v2.json") + return ( httplib.OK, body, @@ -2963,6 +3034,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_servers_12065_os_volume_attachments_DEVICE_AUTO(self, method, url, body, headers): # test_attach_volume_device_auto + if method == "POST": if "rackspace" not in self.__class__.__name__.lower(): body = json.loads(body) @@ -3184,6 +3256,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_os_floating_ip_pools(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_floating_ip_pools.json") + return ( httplib.OK, body, @@ -3196,6 +3269,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_os_floating_ips_foo_bar_id(self, method, url, body, headers): if method == "DELETE": body = "" + return ( httplib.ACCEPTED, body, @@ -3208,6 +3282,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_os_floating_ips(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_floating_ips.json") + return ( httplib.OK, body, @@ -3216,6 +3291,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "POST": body = self.fixtures.load("_floating_ip.json") + return ( httplib.OK, body, @@ -3228,6 +3304,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_4242_action(self, method, url, body, headers): if method == "POST": body = "" + return ( httplib.ACCEPTED, body, @@ -3240,6 +3317,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_os_networks(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_os_networks.json") + return ( httplib.OK, body, @@ -3248,6 +3326,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "POST": body = self.fixtures.load("_os_networks_POST.json") + return ( httplib.ACCEPTED, body, @@ -3261,6 +3340,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "DELETE": body = "" + return ( httplib.ACCEPTED, body, @@ -3272,6 +3352,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_72258_action(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_servers_suspend.json") + return ( httplib.ACCEPTED, body, @@ -3284,6 +3365,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12063_action(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_servers_unpause.json") + return ( httplib.ACCEPTED, body, @@ -3296,6 +3378,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v1_1_slug_servers_12086_action(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_servers_12086_console_output.json") + return ( httplib.ACCEPTED, body, @@ -3377,6 +3460,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): if method == "GET": if "router:external=True" in url: body = self.fixtures.load("_v2_0__networks_public.json") + return ( httplib.OK, body, @@ -3385,6 +3469,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) else: body = self.fixtures.load("_v2_0__networks.json") + return ( httplib.OK, body, @@ -3393,6 +3478,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "POST": body = self.fixtures.load("_v2_0__networks_POST.json") + return ( httplib.ACCEPTED, body, @@ -3406,6 +3492,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_v2_0__network.json") + return ( httplib.OK, body, @@ -3419,6 +3506,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_v2_0__network_no_tags.json") + return ( httplib.OK, body, @@ -3432,6 +3520,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_v2_0__networks_POST.json") + return ( httplib.OK, body, @@ -3440,6 +3529,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3452,14 +3542,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_v2_0__subnet.json") + return ( httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3468,6 +3561,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "PUT": body = self.fixtures.load("_v2_0__subnet.json") + return ( httplib.OK, body, @@ -3478,6 +3572,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_subnets(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__subnet.json") + return ( httplib.CREATED, body, @@ -3486,6 +3581,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) else: body = self.fixtures.load("_v2_0__subnets.json") + return ( httplib.OK, body, @@ -3495,6 +3591,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_volumes_detail(self, method, url, body, headers): body = self.fixtures.load("_v2_0__volumes.json") + return ( httplib.OK, body, @@ -3505,6 +3602,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_volumes(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__volume.json") + return ( httplib.CREATED, body, @@ -3515,14 +3613,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_volumes_cd76a3a1_c4ce_40f6_9b9f_07a61508938d(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__volume.json") + return ( httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3533,14 +3634,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_volumes_abc6a3a1_c4ce_40f6_9b9f_07a61508938d(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__volume_abc6a3a1_c4ce_40f6_9b9f_07a61508938d.json") + return ( httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3555,6 +3659,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): body = self.fixtures.load("_v2_0__snapshots_paginate_start.json") else: body = self.fixtures.load("_v2_0__snapshots.json") + return ( httplib.OK, body, @@ -3565,6 +3670,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_snapshots(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__snapshot.json") + return ( httplib.CREATED, body, @@ -3575,14 +3681,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_snapshots_3fbbcccf_d058_4502_8844_6feeffdf4cb5(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__snapshot.json") + return ( httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3593,14 +3702,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_security_groups(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__security_group.json") + return ( httplib.CREATED, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "GET": body = self.fixtures.load("_v2_0__security_groups.json") + return ( httplib.OK, body, @@ -3611,14 +3723,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_security_groups_6(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__security_group.json") + return ( httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3629,6 +3744,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_security_group_rules(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__security_group_rule.json") + return ( httplib.CREATED, body, @@ -3639,6 +3755,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_security_group_rules_2(self, method, url, body, headers): if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3649,12 +3766,14 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_floatingips(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__floatingip.json") + return ( httplib.CREATED, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "GET": if "floating_network_id=" in url: body = self.fixtures.load("_v2_0__floatingips_net_id.json") @@ -3662,6 +3781,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): body = self.fixtures.load("_v2_0__floatingips_ip_id.json") else: body = self.fixtures.load("_v2_0__floatingips.json") + return ( httplib.OK, body, @@ -3672,6 +3792,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_floatingips_foo_bar_id(self, method, url, body, headers): if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3691,6 +3812,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ], ) body = "" + return ( httplib.OK, body, @@ -3703,14 +3825,17 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_v2_0__router.json") + return ( httplib.OK, body, self.json_content_headers, httplib.responses[httplib.OK], ) + if method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3721,6 +3846,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_v2_0_routers(self, method, url, body, headers): if method == "POST": body = self.fixtures.load("_v2_0__router.json") + return ( httplib.CREATED, body, @@ -3729,6 +3855,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) else: body = self.fixtures.load("_v2_0__routers.json") + return ( httplib.OK, body, @@ -3741,6 +3868,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "PUT": body = self.fixtures.load("_v2_0__router_interface.json") + return ( httplib.OK, body, @@ -3753,6 +3881,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "PUT": body = self.fixtures.load("_v2_0__router_interface.json") + return ( httplib.OK, body, @@ -3763,6 +3892,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_os_quota_sets_tenant_id_detail(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__quota_set.json") + return ( httplib.OK, body, @@ -3773,6 +3903,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_flavors_7_os_extra_specs(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_flavor_extra_specs.json") + return ( httplib.OK, body, @@ -3785,11 +3916,13 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_servers_1000_action(self, method, url, body, headers): if method != "POST" or body != '{"removeSecurityGroup": {"name": "sgname"}}': raise NotImplementedError(body) + return httplib.ACCEPTED, None, {}, httplib.responses[httplib.ACCEPTED] def _v2_1337_v2_0_quotas_tenant_id_details_json(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__network_quota.json") + return ( httplib.OK, body, @@ -3800,6 +3933,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v3_1337_os_quota_sets_tenant_id(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v3_0__volume_quota.json") + return ( httplib.OK, body, @@ -3810,6 +3944,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_os_server_groups(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_v2_0__os_server_groups.json") + return ( httplib.OK, body, @@ -3818,6 +3953,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "POST": body = self.fixtures.load("_v2_0__os_server_group.json") + return ( httplib.OK, body, @@ -3830,6 +3966,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ): if method == "GET": body = self.fixtures.load("_v2_0__os_server_group.json") + return ( httplib.OK, body, @@ -3838,6 +3975,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): ) elif method == "DELETE": body = "" + return ( httplib.NO_CONTENT, body, @@ -3848,6 +3986,7 @@ class OpenStack_1_1_MockHttp(MockHttp, unittest.TestCase): def _v2_1337_servers_4242_os_interface(self, method, url, body, headers): if method == "GET": body = self.fixtures.load("_servers_os_intefaces.json") + return ( httplib.OK, body, @@ -4027,6 +4166,7 @@ class OpenStack_AuthVersions_Tests(unittest.TestCase): if auth_version in ["1.1", "3.0"]: # 1.1 is old and deprecated, 3.0 is not exposed directly to the end user + continue user_id = OPENSTACK_PARAMS[0] diff --git a/pyproject.toml b/pyproject.toml index 9abaeb8c6..92486944b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,6 +90,7 @@ include = ["libcloud", "libcloud.test*" ] [tool.setuptools.package-data] "libcloud.test" = ["*.json", "*.xml", "*.pub", "*.key"] +"libcloud.test.compute.fixtures.openstack_v1_1" = ["*"] "libcloud.test.compute.fixtures.misc" = ["*"] [tool.setuptools]