octavia 14.0.0.0rc1__py3-none-any.whl → 15.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- octavia/amphorae/backends/agent/agent_jinja_cfg.py +1 -4
- octavia/amphorae/backends/agent/api_server/amphora_info.py +5 -5
- octavia/amphorae/backends/agent/api_server/keepalived.py +26 -53
- octavia/amphorae/backends/agent/api_server/keepalivedlvs.py +44 -83
- octavia/amphorae/backends/agent/api_server/loadbalancer.py +94 -112
- octavia/amphorae/backends/agent/api_server/lvs_listener_base.py +1 -1
- octavia/amphorae/backends/agent/api_server/osutils.py +11 -8
- octavia/amphorae/backends/agent/api_server/plug.py +12 -13
- octavia/amphorae/backends/agent/api_server/server.py +4 -3
- octavia/amphorae/backends/agent/api_server/templates/keepalived_lvs_check_script.sh.j2 +0 -4
- octavia/amphorae/backends/agent/api_server/util.py +23 -68
- octavia/amphorae/backends/agent/templates/amphora_agent_conf.template +0 -3
- octavia/amphorae/backends/health_daemon/health_daemon.py +6 -7
- octavia/amphorae/backends/health_daemon/health_sender.py +2 -2
- octavia/amphorae/backends/utils/haproxy_query.py +3 -6
- octavia/amphorae/backends/utils/interface.py +11 -50
- octavia/amphorae/backends/utils/interface_file.py +29 -16
- octavia/amphorae/backends/utils/ip_advertisement.py +1 -1
- octavia/amphorae/backends/utils/keepalivedlvs_query.py +7 -8
- octavia/amphorae/backends/utils/network_namespace.py +3 -3
- octavia/amphorae/backends/utils/nftable_utils.py +33 -11
- octavia/amphorae/drivers/driver_base.py +2 -2
- octavia/amphorae/drivers/haproxy/rest_api_driver.py +26 -38
- octavia/amphorae/drivers/health/heartbeat_udp.py +1 -1
- octavia/amphorae/drivers/keepalived/jinja/jinja_cfg.py +1 -2
- octavia/amphorae/drivers/keepalived/jinja/templates/keepalived_base.template +0 -1
- octavia/amphorae/drivers/noop_driver/driver.py +1 -1
- octavia/api/app.py +1 -2
- octavia/api/common/pagination.py +16 -22
- octavia/api/common/types.py +1 -1
- octavia/api/drivers/amphora_driver/v2/driver.py +6 -6
- octavia/api/drivers/driver_agent/driver_listener.py +3 -3
- octavia/api/drivers/driver_agent/driver_updater.py +1 -1
- octavia/api/drivers/noop_driver/driver.py +1 -1
- octavia/api/root_controller.py +2 -2
- octavia/api/v2/controllers/base.py +2 -4
- octavia/api/v2/controllers/health_monitor.py +5 -3
- octavia/api/v2/controllers/listener.py +2 -2
- octavia/api/v2/controllers/load_balancer.py +7 -0
- octavia/api/v2/controllers/member.py +12 -2
- octavia/api/v2/types/amphora.py +1 -1
- octavia/api/v2/types/availability_zone_profile.py +1 -2
- octavia/api/v2/types/availability_zones.py +1 -2
- octavia/api/v2/types/flavor_profile.py +1 -1
- octavia/api/v2/types/flavors.py +1 -1
- octavia/api/v2/types/health_monitor.py +1 -1
- octavia/api/v2/types/l7policy.py +1 -1
- octavia/api/v2/types/l7rule.py +1 -1
- octavia/api/v2/types/listener.py +3 -3
- octavia/api/v2/types/load_balancer.py +3 -3
- octavia/api/v2/types/member.py +2 -2
- octavia/api/v2/types/pool.py +2 -2
- octavia/api/v2/types/quotas.py +2 -2
- octavia/certificates/common/barbican.py +1 -1
- octavia/certificates/common/cert.py +1 -1
- octavia/certificates/generator/cert_gen.py +1 -1
- octavia/certificates/generator/local.py +5 -5
- octavia/certificates/manager/cert_mgr.py +1 -1
- octavia/certificates/manager/local.py +20 -20
- octavia/cmd/agent.py +3 -3
- octavia/cmd/driver_agent.py +2 -3
- octavia/cmd/health_checker.py +4 -4
- octavia/cmd/interface.py +4 -4
- octavia/cmd/prometheus_proxy.py +11 -13
- octavia/common/base_taskflow.py +3 -3
- octavia/common/clients.py +4 -4
- octavia/common/config.py +18 -24
- octavia/common/constants.py +28 -35
- octavia/common/data_models.py +2 -2
- octavia/common/jinja/haproxy/combined_listeners/jinja_cfg.py +5 -5
- octavia/common/jinja/logging/logging_jinja_cfg.py +1 -1
- octavia/common/jinja/lvs/jinja_cfg.py +1 -1
- octavia/common/jinja/user_data_jinja_cfg.py +1 -1
- octavia/common/keystone.py +1 -1
- octavia/common/policy.py +2 -3
- octavia/common/stats.py +1 -1
- octavia/common/tls_utils/cert_parser.py +2 -1
- octavia/common/utils.py +3 -3
- octavia/common/validate.py +9 -13
- octavia/compute/compute_base.py +1 -1
- octavia/compute/drivers/noop_driver/driver.py +1 -1
- octavia/compute/drivers/nova_driver.py +1 -1
- octavia/controller/healthmanager/health_manager.py +1 -1
- octavia/controller/housekeeping/house_keeping.py +2 -2
- octavia/controller/queue/v2/consumer.py +1 -2
- octavia/controller/queue/v2/endpoints.py +1 -1
- octavia/controller/worker/amphora_rate_limit.py +6 -6
- octavia/controller/worker/task_utils.py +1 -1
- octavia/controller/worker/v2/controller_worker.py +3 -3
- octavia/controller/worker/v2/flows/amphora_flows.py +15 -4
- octavia/controller/worker/v2/flows/flow_utils.py +6 -5
- octavia/controller/worker/v2/flows/health_monitor_flows.py +1 -1
- octavia/controller/worker/v2/flows/l7policy_flows.py +1 -1
- octavia/controller/worker/v2/flows/l7rule_flows.py +1 -1
- octavia/controller/worker/v2/flows/listener_flows.py +18 -6
- octavia/controller/worker/v2/flows/load_balancer_flows.py +1 -1
- octavia/controller/worker/v2/flows/member_flows.py +12 -19
- octavia/controller/worker/v2/flows/pool_flows.py +1 -1
- octavia/controller/worker/v2/taskflow_jobboard_driver.py +17 -3
- octavia/controller/worker/v2/tasks/compute_tasks.py +1 -3
- octavia/controller/worker/v2/tasks/network_tasks.py +3 -4
- octavia/db/base_models.py +21 -9
- octavia/db/migration/alembic_migrations/versions/034756a182a2_amphora_add_image_id.py +2 -2
- octavia/db/migration/alembic_migrations/versions/034b2dc2f3e0_modernize_l7policy_fields.py +31 -31
- octavia/db/migration/alembic_migrations/versions/0f242cf02c74_add_provider_column.py +2 -2
- octavia/db/migration/alembic_migrations/versions/10d38216ad34_add_timestamps_to_amphora.py +4 -4
- octavia/db/migration/alembic_migrations/versions/11e4bb2bb8ef_fix_ipv6_vip.py +1 -1
- octavia/db/migration/alembic_migrations/versions/13500e2e978d_update_url_and_name_size.py +6 -6
- octavia/db/migration/alembic_migrations/versions/14892634e228_update_vip.py +5 -5
- octavia/db/migration/alembic_migrations/versions/186509101b9b_add_server_group_id_to_loadbalancer.py +2 -2
- octavia/db/migration/alembic_migrations/versions/1afc932f1ca2_l7rule_support_client_cert.py +3 -3
- octavia/db/migration/alembic_migrations/versions/1e4c1d83044c_keepalived_configuration_datamodel.py +26 -26
- octavia/db/migration/alembic_migrations/versions/2351ea316465_adding_terminate_https_tls_ref_support.py +4 -4
- octavia/db/migration/alembic_migrations/versions/256852d5ff7c_add_lb_network_ip_to_amphora.py +2 -2
- octavia/db/migration/alembic_migrations/versions/27e54d00c3cd_add_monitor_address_and_port_to_member.py +4 -4
- octavia/db/migration/alembic_migrations/versions/298eac0640a7_add_amphora_vrrp_port_id_and_ha_port_id.py +4 -4
- octavia/db/migration/alembic_migrations/versions/29ff921a6eb_shared_pools.py +3 -3
- octavia/db/migration/alembic_migrations/versions/2ad093f6353f_add_listener_client_ca_tls_certificate_.py +2 -2
- octavia/db/migration/alembic_migrations/versions/31f7653ded67_allow_multiple_vips_per_loadbalancer.py +10 -10
- octavia/db/migration/alembic_migrations/versions/32e5c35b26a8_add_l7policy_and_l7rule_quota.py +4 -4
- octavia/db/migration/alembic_migrations/versions/357d17a6d5ac_update_lb_and_amphora_data_model_for_.py +20 -20
- octavia/db/migration/alembic_migrations/versions/35dee79d5865_initial_create.py +185 -185
- octavia/db/migration/alembic_migrations/versions/36b94648fef8_add_timestamp.py +2 -2
- octavia/db/migration/alembic_migrations/versions/392fb85b4419_add_primary_key_to_spares_pool.py +1 -1
- octavia/db/migration/alembic_migrations/versions/3a1e1cdb7b27_rename_amphora_host_id.py +1 -1
- octavia/db/migration/alembic_migrations/versions/3b199c848b96_create_no_monitor_operational_status.py +1 -1
- octavia/db/migration/alembic_migrations/versions/3e5b37a0bdb9_add_vrrp_ip_and_ha_ip_to_amphora.py +4 -4
- octavia/db/migration/alembic_migrations/versions/3f8ff3be828e_create_quotas_table.py +12 -12
- octavia/db/migration/alembic_migrations/versions/43287cd10fef_make_pool_lb_algorithm_larger.py +6 -6
- octavia/db/migration/alembic_migrations/versions/443fe6676637_add_network_id_to_vip.py +2 -2
- octavia/db/migration/alembic_migrations/versions/44a2414dd683_adding_name_column_to_member_and_health_.py +1 -1
- octavia/db/migration/alembic_migrations/versions/458c9ee2a011_l7_policies_and_rules.py +57 -57
- octavia/db/migration/alembic_migrations/versions/46d914b2a5e5_seed_the_spares_pool_table.py +2 -2
- octavia/db/migration/alembic_migrations/versions/48660b6643f0_add_new_states_for_amphora.py +3 -3
- octavia/db/migration/alembic_migrations/versions/4aeb9e23ad43_add_draining_operating_status.py +1 -1
- octavia/db/migration/alembic_migrations/versions/4c094013699a_update_load_balancer_amphora.py +9 -9
- octavia/db/migration/alembic_migrations/versions/4f65b4f91c39_amphora_add_flavor_id.py +2 -2
- octavia/db/migration/alembic_migrations/versions/4faaa983e7a9_update_member_address_column.py +1 -1
- octavia/db/migration/alembic_migrations/versions/4fe8240425b4_update_vip_add_subnet_id.py +2 -2
- octavia/db/migration/alembic_migrations/versions/52377704420e_add_timestamps_to_healthmonitor.py +9 -9
- octavia/db/migration/alembic_migrations/versions/5309960964f8_add_proxy_protocol_for_pool.py +3 -3
- octavia/db/migration/alembic_migrations/versions/543f5d8e4e56_add_a_column_busy_in_table_amphora_health.py +2 -2
- octavia/db/migration/alembic_migrations/versions/55874a4ceed6_add_l7policy_action_redirect_prefix.py +5 -5
- octavia/db/migration/alembic_migrations/versions/5a3ee5472c31_add_cert_expiration__infor_in_amphora_table.py +4 -4
- octavia/db/migration/alembic_migrations/versions/62816c232310_fix_migration_for_mysql_5_7.py +1 -1
- octavia/db/migration/alembic_migrations/versions/6742ca1b27c2_add_l7policy_redirect_http_code.py +2 -2
- octavia/db/migration/alembic_migrations/versions/6ac558d7fc21_add_prometheus_listener_protocol.py +3 -3
- octavia/db/migration/alembic_migrations/versions/6ffc710674ef_spares_pool_table.py +2 -2
- octavia/db/migration/alembic_migrations/versions/7432f1d4ea83_add_http_host_head_inject_for_http_health_check.py +4 -4
- octavia/db/migration/alembic_migrations/versions/74aae261694c_extend_pool_for_backend_ca_and_crl.py +4 -4
- octavia/db/migration/alembic_migrations/versions/76aacf2e176c_extend_support_udp_protocol.py +3 -3
- octavia/db/migration/alembic_migrations/versions/80dba23a159f_tags_support.py +3 -3
- octavia/db/migration/alembic_migrations/versions/82b9402e71fd_update_vip_address_size.py +1 -1
- octavia/db/migration/alembic_migrations/versions/8ac4ed24df3a_add_availability_zone_to_lb.py +4 -4
- octavia/db/migration/alembic_migrations/versions/8b47b2546312_sctp_support.py +2 -2
- octavia/db/migration/alembic_migrations/versions/8c0851bdf6c3_change_tls_container_id_length_in_sni_.py +1 -1
- octavia/db/migration/alembic_migrations/versions/92fe9857279_create_healthmanager_table.py +3 -3
- octavia/db/migration/alembic_migrations/versions/9b5473976d6d_add_provisioning_status_to_objects.py +10 -10
- octavia/db/migration/alembic_migrations/versions/a1f689aecc1d_extend_pool_for_support_backend_reencryption.py +2 -2
- octavia/db/migration/alembic_migrations/versions/a7f187cd221f_add_tls_boolean_type_for_reencryption.py +2 -2
- octavia/db/migration/alembic_migrations/versions/b9c703669314_add_flavor_and_flavor_profile_table.py +18 -18
- octavia/db/migration/alembic_migrations/versions/ba35e0fb88e1_add_backup_field_to_member.py +2 -2
- octavia/db/migration/alembic_migrations/versions/bf171d0d91c3_amphora_add_cached_zone.py +2 -2
- octavia/db/migration/alembic_migrations/versions/c761c8a71579_add_availability_zone_table.py +15 -15
- octavia/db/migration/alembic_migrations/versions/d85ca7258d21_modernize_l7rule.py +13 -13
- octavia/db/migration/alembic_migrations/versions/da371b422669_allowed_cidr_for_listeners.py +7 -7
- octavia/db/migration/alembic_migrations/versions/dcf88e59aae4_add_lb_algorithm_source_ip_port.py +3 -3
- octavia/db/migration/alembic_migrations/versions/e37941b010db_add_lb_flavor_constraint.py +11 -11
- octavia/db/migration/alembic_migrations/versions/e6672bda93bf_add_ping_and_tlshello_monitor_types.py +3 -3
- octavia/db/migration/alembic_migrations/versions/e6ee84f0abf3_add_proxy_v2_pool_protocol.py +3 -3
- octavia/db/migration/alembic_migrations/versions/ebbcc72b4e5e_add_octavia_owned_vip_column_to_vip_.py +2 -2
- octavia/db/migration/alembic_migrations/versions/f21ae3f21adc_add_client_auth_option.py +6 -6
- octavia/db/migration/alembic_migrations/versions/fc5582da7d8a_create_amphora_build_rate_limit_tables.py +11 -11
- octavia/db/migration/alembic_migrations/versions/ffad172e98c1_add_certificate_revoke_list_option.py +2 -2
- octavia/db/models.py +1 -1
- octavia/db/repositories.py +3 -3
- octavia/distributor/drivers/driver_base.py +1 -1
- octavia/distributor/drivers/noop_driver/driver.py +1 -1
- octavia/hacking/checks.py +4 -4
- octavia/image/drivers/noop_driver/driver.py +1 -1
- octavia/image/image_base.py +1 -1
- octavia/network/base.py +1 -1
- octavia/network/drivers/neutron/allowed_address_pairs.py +11 -9
- octavia/network/drivers/neutron/base.py +3 -3
- octavia/network/drivers/noop_driver/driver.py +1 -1
- octavia/policies/amphora.py +6 -12
- octavia/policies/availability_zone.py +5 -10
- octavia/policies/availability_zone_profile.py +5 -15
- octavia/policies/base.py +1 -20
- octavia/policies/flavor.py +5 -10
- octavia/policies/flavor_profile.py +5 -10
- octavia/policies/healthmonitor.py +6 -12
- octavia/policies/l7policy.py +6 -12
- octavia/policies/l7rule.py +5 -10
- octavia/policies/listener.py +7 -14
- octavia/policies/loadbalancer.py +9 -18
- octavia/policies/member.py +5 -10
- octavia/policies/pool.py +6 -12
- octavia/policies/provider.py +1 -2
- octavia/policies/provider_availability_zone.py +1 -3
- octavia/policies/provider_flavor.py +1 -2
- octavia/policies/quota.py +6 -12
- octavia/statistics/stats_base.py +1 -1
- octavia/tests/common/constants.py +1 -1
- octavia/tests/common/data_model_helpers.py +10 -10
- octavia/tests/common/sample_data_models.py +1 -1
- octavia/tests/common/sample_haproxy_prometheus +17 -17
- octavia/tests/common/sample_octavia_prometheus +6 -6
- octavia/tests/common/utils.py +2 -2
- octavia/tests/functional/amphorae/backend/agent/api_server/test_keepalivedlvs.py +36 -62
- octavia/tests/functional/amphorae/backend/agent/api_server/test_server.py +135 -296
- octavia/tests/functional/api/drivers/driver_agent/test_driver_agent.py +10 -11
- octavia/tests/functional/api/v2/base.py +2 -3
- octavia/tests/functional/api/v2/test_amphora.py +6 -6
- octavia/tests/functional/api/v2/test_availability_zone_profiles.py +13 -14
- octavia/tests/functional/api/v2/test_availability_zones.py +19 -19
- octavia/tests/functional/api/v2/test_flavor_profiles.py +19 -20
- octavia/tests/functional/api/v2/test_flavors.py +25 -25
- octavia/tests/functional/api/v2/test_health_monitor.py +35 -18
- octavia/tests/functional/api/v2/test_l7policy.py +11 -11
- octavia/tests/functional/api/v2/test_l7rule.py +19 -20
- octavia/tests/functional/api/v2/test_listener.py +26 -28
- octavia/tests/functional/api/v2/test_load_balancer.py +17 -17
- octavia/tests/functional/api/v2/test_member.py +53 -21
- octavia/tests/functional/api/v2/test_pool.py +11 -11
- octavia/tests/functional/api/v2/test_provider.py +7 -7
- octavia/tests/functional/api/v2/test_quotas.py +9 -9
- octavia/tests/functional/db/test_models.py +1 -1
- octavia/tests/functional/db/test_repositories.py +2 -2
- octavia/tests/unit/amphorae/backends/agent/api_server/test_amphora_info.py +60 -61
- octavia/tests/unit/amphorae/backends/agent/api_server/test_keepalived.py +3 -3
- octavia/tests/unit/amphorae/backends/agent/api_server/test_keepalivedlvs.py +1 -19
- octavia/tests/unit/amphorae/backends/agent/api_server/test_loadbalancer.py +94 -34
- octavia/tests/unit/amphorae/backends/agent/api_server/test_osutils.py +19 -21
- octavia/tests/unit/amphorae/backends/agent/api_server/test_plug.py +9 -11
- octavia/tests/unit/amphorae/backends/agent/api_server/test_util.py +11 -25
- octavia/tests/unit/amphorae/backends/agent/test_agent_jinja_cfg.py +0 -13
- octavia/tests/unit/amphorae/backends/health_daemon/test_health_daemon.py +10 -10
- octavia/tests/unit/amphorae/backends/utils/test_haproxy_query.py +1 -1
- octavia/tests/unit/amphorae/backends/utils/test_interface.py +33 -94
- octavia/tests/unit/amphorae/backends/utils/test_interface_file.py +32 -32
- octavia/tests/unit/amphorae/backends/utils/test_network_namespace.py +4 -6
- octavia/tests/unit/amphorae/backends/utils/test_nftable_utils.py +28 -22
- octavia/tests/unit/amphorae/drivers/haproxy/test_rest_api_driver_1_0.py +77 -118
- octavia/tests/unit/amphorae/drivers/health/test_heartbeat_udp.py +8 -8
- octavia/tests/unit/amphorae/drivers/keepalived/jinja/test_jinja_cfg.py +0 -4
- octavia/tests/unit/api/common/test_pagination.py +84 -14
- octavia/tests/unit/api/v2/types/test_availability_zone_profile.py +1 -1
- octavia/tests/unit/api/v2/types/test_availability_zones.py +1 -1
- octavia/tests/unit/api/v2/types/test_flavor_profile.py +1 -1
- octavia/tests/unit/api/v2/types/test_flavors.py +1 -1
- octavia/tests/unit/api/v2/types/test_health_monitor.py +1 -1
- octavia/tests/unit/api/v2/types/test_listener.py +1 -1
- octavia/tests/unit/api/v2/types/test_load_balancer.py +1 -1
- octavia/tests/unit/api/v2/types/test_pool.py +1 -1
- octavia/tests/unit/base.py +1 -0
- octavia/tests/unit/certificates/generator/local_csr.py +1 -1
- octavia/tests/unit/certificates/generator/test_local.py +5 -5
- octavia/tests/unit/certificates/manager/test_barbican.py +2 -3
- octavia/tests/unit/certificates/manager/test_barbican_legacy.py +1 -1
- octavia/tests/unit/certificates/manager/test_local.py +13 -14
- octavia/tests/unit/cmd/test_health_checker.py +1 -1
- octavia/tests/unit/cmd/test_prometheus_proxy.py +8 -1
- octavia/tests/unit/common/jinja/haproxy/combined_listeners/test_jinja_cfg.py +171 -216
- octavia/tests/unit/common/jinja/logging/test_logging_jinja_cfg.py +1 -1
- octavia/tests/unit/common/sample_configs/sample_configs_combined.py +1 -2
- octavia/tests/unit/common/test_base_taskflow.py +1 -1
- octavia/tests/unit/common/test_decorators.py +2 -2
- octavia/tests/unit/common/test_policy.py +3 -6
- octavia/tests/unit/common/tls_utils/test_cert_parser.py +4 -1
- octavia/tests/unit/controller/worker/v2/flows/test_listener_flows.py +10 -15
- octavia/tests/unit/controller/worker/v2/flows/test_load_balancer_flows.py +4 -6
- octavia/tests/unit/controller/worker/v2/tasks/test_network_tasks.py +6 -2
- octavia/tests/unit/controller/worker/v2/tasks/test_retry_tasks.py +1 -1
- octavia/tests/unit/controller/worker/v2/test_controller_worker.py +56 -1
- octavia/tests/unit/controller/worker/v2/test_taskflow_jobboard_driver.py +348 -0
- octavia/tests/unit/hacking/test_checks.py +3 -3
- octavia/tests/unit/image/drivers/noop_driver/test_driver.py +1 -1
- octavia/tests/unit/image/drivers/test_glance_driver.py +1 -1
- octavia/tests/unit/network/drivers/neutron/test_base.py +1 -1
- octavia/tests/unit/statistics/drivers/test_update_db.py +1 -1
- octavia/tests/unit/statistics/test_stats_base.py +1 -1
- octavia/volume/drivers/noop_driver/driver.py +1 -1
- octavia/volume/volume_base.py +1 -1
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/AUTHORS +6 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/METADATA +3 -5
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/RECORD +302 -305
- octavia-15.0.0.dist-info/pbr.json +1 -0
- octavia/amphorae/backends/agent/api_server/templates/keepalived.sysvinit.j2 +0 -87
- octavia/amphorae/backends/agent/api_server/templates/keepalived.upstart.j2 +0 -29
- octavia/amphorae/backends/agent/api_server/templates/sysvinit.conf.j2 +0 -232
- octavia/amphorae/backends/agent/api_server/templates/upstart.conf.j2 +0 -71
- octavia-14.0.0.0rc1.dist-info/pbr.json +0 -1
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/LICENSE +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/README.rst +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/README.rst +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/diskimage-create.sh +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/image-tests.sh +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/requirements.txt +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/test-requirements.txt +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/tox.ini +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/data/share/octavia/diskimage-create/version.txt +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.data}/scripts/octavia-wsgi +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/LICENSE +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/WHEEL +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/entry_points.txt +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.dist-info}/top_level.txt +0 -0
@@ -46,15 +46,13 @@ class DriverAgentTest(base.OctaviaDBTestBase):
|
|
46
46
|
self.get_listener_proc.join(5)
|
47
47
|
|
48
48
|
def setUp(self):
|
49
|
-
status_socket_file = '/tmp/octavia-{}
|
50
|
-
|
51
|
-
stats_socket_file = '/tmp/octavia-{}
|
52
|
-
|
53
|
-
get_socket_file = '/tmp/octavia-{}.get.sock'
|
54
|
-
|
55
|
-
|
56
|
-
uuidutils.generate_uuid())
|
57
|
-
sqlite_db_connection = 'sqlite:///{}'.format(sqlite_db_file)
|
49
|
+
status_socket_file = (f'/tmp/octavia-{uuidutils.generate_uuid()}'
|
50
|
+
f'.status.sock')
|
51
|
+
stats_socket_file = (f'/tmp/octavia-{uuidutils.generate_uuid()}'
|
52
|
+
f'.stats.sock')
|
53
|
+
get_socket_file = f'/tmp/octavia-{uuidutils.generate_uuid()}.get.sock'
|
54
|
+
sqlite_db_file = f'/tmp/octavia-{uuidutils.generate_uuid()}.sqlite.db'
|
55
|
+
sqlite_db_connection = f'sqlite:///{sqlite_db_file}'
|
58
56
|
|
59
57
|
# Note that because the driver agent is a multi-process
|
60
58
|
# agent we must use a sqlite file rather than an
|
@@ -602,8 +600,9 @@ class DriverAgentTest(base.OctaviaDBTestBase):
|
|
602
600
|
self.session.commit()
|
603
601
|
|
604
602
|
result = self.driver_lib.get_member(member_dict[lib_consts.ID])
|
605
|
-
self.
|
606
|
-
|
603
|
+
self._compare_member_dicts(
|
604
|
+
self.sample_data.provider_member2_dict,
|
605
|
+
result.to_dict(render_unsets=True))
|
607
606
|
|
608
607
|
# Test deleting a member
|
609
608
|
status = {
|
@@ -170,10 +170,9 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|
170
170
|
full_path = self._get_full_path(path)
|
171
171
|
param_string = ""
|
172
172
|
for k, v in params.items():
|
173
|
-
param_string += "{
|
173
|
+
param_string += f"{k}={v}&"
|
174
174
|
if param_string:
|
175
|
-
full_path = "{
|
176
|
-
path=full_path, params=param_string.rstrip("&"))
|
175
|
+
full_path = f"{full_path}?{param_string.rstrip('&')}"
|
177
176
|
response = self.app.delete(full_path,
|
178
177
|
headers=headers,
|
179
178
|
status=status,
|
@@ -500,17 +500,17 @@ class TestAmphora(base.BaseAPITest):
|
|
500
500
|
amps = self.get(self.AMPHORAE_PATH, params={
|
501
501
|
'fields': ['id', 'role']}).json
|
502
502
|
for amp in amps['amphorae']:
|
503
|
-
self.assertIn(
|
504
|
-
self.assertIn(
|
505
|
-
self.assertNotIn(
|
503
|
+
self.assertIn('id', amp)
|
504
|
+
self.assertIn('role', amp)
|
505
|
+
self.assertNotIn('ha_port_id', amp)
|
506
506
|
|
507
507
|
def test_get_one_fields_filter(self):
|
508
508
|
amp = self.get(
|
509
509
|
self.AMPHORA_PATH.format(amphora_id=self.amp_id),
|
510
510
|
params={'fields': ['id', 'role']}).json.get(self.root_tag)
|
511
|
-
self.assertIn(
|
512
|
-
self.assertIn(
|
513
|
-
self.assertNotIn(
|
511
|
+
self.assertIn('id', amp)
|
512
|
+
self.assertIn('role', amp)
|
513
|
+
self.assertNotIn('ha_port_id', amp)
|
514
514
|
|
515
515
|
def test_get_all_filter(self):
|
516
516
|
self._create_additional_amp()
|
@@ -191,9 +191,9 @@ class TestAvailabilityZoneProfiles(base.BaseAPITest):
|
|
191
191
|
'fields': ['id', constants.PROVIDER_NAME]}
|
192
192
|
).json.get(self.root_tag)
|
193
193
|
self.assertEqual(azp.get('id'), response.get('id'))
|
194
|
-
self.assertIn(
|
194
|
+
self.assertIn('id', response)
|
195
195
|
self.assertIn(constants.PROVIDER_NAME, response)
|
196
|
-
self.assertNotIn(
|
196
|
+
self.assertNotIn('name', response)
|
197
197
|
self.assertNotIn(constants.AVAILABILITY_ZONE_DATA, response)
|
198
198
|
|
199
199
|
def test_get_authorized(self):
|
@@ -243,15 +243,15 @@ class TestAvailabilityZoneProfiles(base.BaseAPITest):
|
|
243
243
|
def test_get_all(self):
|
244
244
|
fp1 = self.create_availability_zone_profile(
|
245
245
|
'test1', 'noop_driver', '{"compute_zone": "my_az_1"}')
|
246
|
-
ref_fp_1 = {
|
247
|
-
|
248
|
-
constants.PROVIDER_NAME:
|
246
|
+
ref_fp_1 = {'availability_zone_data': '{"compute_zone": "my_az_1"}',
|
247
|
+
'id': fp1.get('id'), 'name': 'test1',
|
248
|
+
constants.PROVIDER_NAME: 'noop_driver'}
|
249
249
|
self.assertTrue(uuidutils.is_uuid_like(fp1.get('id')))
|
250
250
|
fp2 = self.create_availability_zone_profile(
|
251
251
|
'test2', 'noop_driver-alt', '{"compute_zone": "my_az_1"}')
|
252
|
-
ref_fp_2 = {
|
253
|
-
|
254
|
-
constants.PROVIDER_NAME:
|
252
|
+
ref_fp_2 = {'availability_zone_data': '{"compute_zone": "my_az_1"}',
|
253
|
+
'id': fp2.get('id'), 'name': 'test2',
|
254
|
+
constants.PROVIDER_NAME: 'noop_driver-alt'}
|
255
255
|
self.assertTrue(uuidutils.is_uuid_like(fp2.get('id')))
|
256
256
|
|
257
257
|
response = self.get(self.AZPS_PATH)
|
@@ -273,8 +273,8 @@ class TestAvailabilityZoneProfiles(base.BaseAPITest):
|
|
273
273
|
api_list = response.json.get(self.root_tag_list)
|
274
274
|
self.assertEqual(2, len(api_list))
|
275
275
|
for profile in api_list:
|
276
|
-
self.assertIn(
|
277
|
-
self.assertIn(
|
276
|
+
self.assertIn('id', profile)
|
277
|
+
self.assertIn('name', profile)
|
278
278
|
self.assertNotIn(constants.PROVIDER_NAME, profile)
|
279
279
|
self.assertNotIn(constants.AVAILABILITY_ZONE_DATA, profile)
|
280
280
|
|
@@ -375,8 +375,7 @@ class TestAvailabilityZoneProfiles(base.BaseAPITest):
|
|
375
375
|
def _test_update_param_none(self, param_name):
|
376
376
|
azp = self.create_availability_zone_profile(
|
377
377
|
'test_profile', 'noop_driver', '{"x": "y"}')
|
378
|
-
expect_error_msg =
|
379
|
-
param_name)
|
378
|
+
expect_error_msg = f"None is not a valid option for {param_name}"
|
380
379
|
body = self._build_body({param_name: None})
|
381
380
|
response = self.put(self.AZP_PATH.format(azp_id=azp.get('id')), body,
|
382
381
|
status=400)
|
@@ -513,7 +512,7 @@ class TestAvailabilityZoneProfiles(base.BaseAPITest):
|
|
513
512
|
self.delete(self.AZP_PATH.format(azp_id=azp.get('id')))
|
514
513
|
response = self.get(self.AZP_PATH.format(
|
515
514
|
azp_id=azp.get('id')), status=404)
|
516
|
-
err_msg = "Availability Zone Profile
|
515
|
+
err_msg = f"Availability Zone Profile {azp.get('id')} not found."
|
517
516
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
518
517
|
|
519
518
|
def test_delete_deleted_id(self):
|
@@ -560,7 +559,7 @@ class TestAvailabilityZoneProfiles(base.BaseAPITest):
|
|
560
559
|
self.conf.config(group='api_settings', auth_strategy=auth_strategy)
|
561
560
|
response = self.get(self.AZP_PATH.format(
|
562
561
|
azp_id=azp.get('id')), status=404)
|
563
|
-
err_msg = "Availability Zone Profile
|
562
|
+
err_msg = f"Availability Zone Profile {azp.get('id')} not found."
|
564
563
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
565
564
|
|
566
565
|
def test_delete_not_authorized(self):
|
@@ -186,15 +186,15 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
186
186
|
self.assertEqual(az.get('name'), response.get('name'))
|
187
187
|
self.assertEqual(self.azp.get('id'),
|
188
188
|
response.get('availability_zone_profile_id'))
|
189
|
-
self.assertIn(
|
190
|
-
self.assertNotIn(
|
191
|
-
self.assertNotIn(
|
189
|
+
self.assertIn('availability_zone_profile_id', response)
|
190
|
+
self.assertNotIn('description', response)
|
191
|
+
self.assertNotIn('enabled', response)
|
192
192
|
|
193
193
|
def test_get_one_deleted_name(self):
|
194
194
|
response = self.get(
|
195
195
|
self.AZ_PATH.format(az_name=constants.NIL_UUID), status=404)
|
196
196
|
self.assertEqual(
|
197
|
-
'Availability Zone {} not found.'
|
197
|
+
f'Availability Zone {constants.NIL_UUID} not found.',
|
198
198
|
response.json.get('faultstring'))
|
199
199
|
|
200
200
|
def test_get_authorized(self):
|
@@ -214,7 +214,7 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
214
214
|
'is_admin_project': True,
|
215
215
|
'service_project_domain_id': None,
|
216
216
|
'service_project_id': None,
|
217
|
-
'roles': ['load-balancer_member'],
|
217
|
+
'roles': ['load-balancer_member', 'member'],
|
218
218
|
'user_id': None,
|
219
219
|
'is_admin': False,
|
220
220
|
'service_user_domain_id': None,
|
@@ -249,15 +249,15 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
249
249
|
self.create_availability_zone(
|
250
250
|
'name1', 'description', self.azp.get('id'), True)
|
251
251
|
ref_az_1 = {
|
252
|
-
|
253
|
-
|
254
|
-
|
252
|
+
'description': 'description', 'enabled': True,
|
253
|
+
'availability_zone_profile_id': self.azp.get('id'),
|
254
|
+
'name': 'name1'}
|
255
255
|
self.create_availability_zone(
|
256
256
|
'name2', 'description', self.azp.get('id'), True)
|
257
257
|
ref_az_2 = {
|
258
|
-
|
259
|
-
|
260
|
-
|
258
|
+
'description': 'description', 'enabled': True,
|
259
|
+
'availability_zone_profile_id': self.azp.get('id'),
|
260
|
+
'name': 'name2'}
|
261
261
|
response = self.get(self.AZS_PATH)
|
262
262
|
api_list = response.json.get(self.root_tag_list)
|
263
263
|
self.assertEqual(2, len(api_list))
|
@@ -274,10 +274,10 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
274
274
|
api_list = response.json.get(self.root_tag_list)
|
275
275
|
self.assertEqual(2, len(api_list))
|
276
276
|
for az in api_list:
|
277
|
-
self.assertIn(
|
278
|
-
self.assertNotIn(
|
279
|
-
self.assertNotIn(
|
280
|
-
self.assertNotIn(
|
277
|
+
self.assertIn('name', az)
|
278
|
+
self.assertNotIn('availability_zone_profile_id', az)
|
279
|
+
self.assertNotIn('description', az)
|
280
|
+
self.assertNotIn('enabled', az)
|
281
281
|
|
282
282
|
def test_get_all_authorized(self):
|
283
283
|
self.create_availability_zone(
|
@@ -355,7 +355,7 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
355
355
|
self.AZ_PATH.format(az_name=constants.NIL_UUID), body,
|
356
356
|
status=404)
|
357
357
|
self.assertEqual(
|
358
|
-
'Availability Zone {} not found.'
|
358
|
+
f'Availability Zone {constants.NIL_UUID} not found.',
|
359
359
|
response.json.get('faultstring'))
|
360
360
|
|
361
361
|
def test_update_none(self):
|
@@ -492,7 +492,7 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
492
492
|
self.delete(self.AZ_PATH.format(az_name=az.get('name')))
|
493
493
|
response = self.get(self.AZ_PATH.format(az_name=az.get('name')),
|
494
494
|
status=404)
|
495
|
-
err_msg = "Availability Zone
|
495
|
+
err_msg = f"Availability Zone {az.get('name')} not found."
|
496
496
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
497
497
|
|
498
498
|
def test_delete_nonexistent_name(self):
|
@@ -505,7 +505,7 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
505
505
|
response = self.delete(
|
506
506
|
self.AZ_PATH.format(az_name=constants.NIL_UUID), status=404)
|
507
507
|
self.assertEqual(
|
508
|
-
'Availability Zone {} not found.'
|
508
|
+
f'Availability Zone {constants.NIL_UUID} not found.',
|
509
509
|
response.json.get('faultstring'))
|
510
510
|
|
511
511
|
def test_delete_authorized(self):
|
@@ -539,7 +539,7 @@ class TestAvailabilityZones(base.BaseAPITest):
|
|
539
539
|
self.conf.config(group='api_settings', auth_strategy=auth_strategy)
|
540
540
|
response = self.get(self.AZ_PATH.format(az_name=az.get('name')),
|
541
541
|
status=404)
|
542
|
-
err_msg = "Availability Zone
|
542
|
+
err_msg = f"Availability Zone {az.get('name')} not found."
|
543
543
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
544
544
|
|
545
545
|
def test_delete_not_authorized(self):
|
@@ -189,9 +189,9 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
189
189
|
'fields': ['id', constants.PROVIDER_NAME]}
|
190
190
|
).json.get(self.root_tag)
|
191
191
|
self.assertEqual(fp.get('id'), response.get('id'))
|
192
|
-
self.assertIn(
|
192
|
+
self.assertIn('id', response)
|
193
193
|
self.assertIn(constants.PROVIDER_NAME, response)
|
194
|
-
self.assertNotIn(
|
194
|
+
self.assertNotIn('name', response)
|
195
195
|
self.assertNotIn(constants.FLAVOR_DATA, response)
|
196
196
|
|
197
197
|
def test_get_authorized(self):
|
@@ -241,15 +241,15 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
241
241
|
def test_get_all(self):
|
242
242
|
fp1 = self.create_flavor_profile('test1', 'noop_driver',
|
243
243
|
'{"image": "ubuntu"}')
|
244
|
-
ref_fp_1 = {
|
245
|
-
|
246
|
-
constants.PROVIDER_NAME:
|
244
|
+
ref_fp_1 = {'flavor_data': '{"image": "ubuntu"}',
|
245
|
+
'id': fp1.get('id'), 'name': 'test1',
|
246
|
+
constants.PROVIDER_NAME: 'noop_driver'}
|
247
247
|
self.assertTrue(uuidutils.is_uuid_like(fp1.get('id')))
|
248
248
|
fp2 = self.create_flavor_profile('test2', 'noop_driver-alt',
|
249
249
|
'{"image": "ubuntu"}')
|
250
|
-
ref_fp_2 = {
|
251
|
-
|
252
|
-
constants.PROVIDER_NAME:
|
250
|
+
ref_fp_2 = {'flavor_data': '{"image": "ubuntu"}',
|
251
|
+
'id': fp2.get('id'), 'name': 'test2',
|
252
|
+
constants.PROVIDER_NAME: 'noop_driver-alt'}
|
253
253
|
self.assertTrue(uuidutils.is_uuid_like(fp2.get('id')))
|
254
254
|
|
255
255
|
response = self.get(self.FPS_PATH)
|
@@ -271,8 +271,8 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
271
271
|
api_list = response.json.get(self.root_tag_list)
|
272
272
|
self.assertEqual(2, len(api_list))
|
273
273
|
for profile in api_list:
|
274
|
-
self.assertIn(
|
275
|
-
self.assertIn(
|
274
|
+
self.assertIn('id', profile)
|
275
|
+
self.assertIn('name', profile)
|
276
276
|
self.assertNotIn(constants.PROVIDER_NAME, profile)
|
277
277
|
self.assertNotIn(constants.FLAVOR_DATA, profile)
|
278
278
|
|
@@ -373,8 +373,7 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
373
373
|
def _test_update_param_none(self, param_name):
|
374
374
|
fp = self.create_flavor_profile('test_profile', 'noop_driver',
|
375
375
|
'{"x": "y"}')
|
376
|
-
expect_error_msg =
|
377
|
-
param_name)
|
376
|
+
expect_error_msg = f"None is not a valid option for {param_name}"
|
378
377
|
body = self._build_body({param_name: None})
|
379
378
|
response = self.put(self.FP_PATH.format(fp_id=fp.get('id')), body,
|
380
379
|
status=400)
|
@@ -465,8 +464,8 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
465
464
|
body = self._build_body(update_data)
|
466
465
|
response = self.put(self.FP_PATH.format(fp_id=fp.get('id')), body,
|
467
466
|
status=409)
|
468
|
-
err_msg = ("Flavor profile {} is in use and cannot be "
|
469
|
-
"modified."
|
467
|
+
err_msg = (f"Flavor profile {fp.get('id')} is in use and cannot be "
|
468
|
+
f"modified.")
|
470
469
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
471
470
|
response = self.get(
|
472
471
|
self.FP_PATH.format(fp_id=fp.get('id'))).json.get(self.root_tag)
|
@@ -480,8 +479,8 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
480
479
|
body = self._build_body(update_data)
|
481
480
|
response = self.put(self.FP_PATH.format(fp_id=fp.get('id')), body,
|
482
481
|
status=409)
|
483
|
-
err_msg = ("Flavor profile {} is in use and cannot
|
484
|
-
"modified."
|
482
|
+
err_msg = (f"Flavor profile {fp.get('id')} is in use and cannot "
|
483
|
+
f"be modified.")
|
485
484
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
486
485
|
response = self.get(
|
487
486
|
self.FP_PATH.format(fp_id=fp.get('id'))).json.get(self.root_tag)
|
@@ -506,7 +505,7 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
506
505
|
self.delete(self.FP_PATH.format(fp_id=fp.get('id')))
|
507
506
|
response = self.get(self.FP_PATH.format(
|
508
507
|
fp_id=fp.get('id')), status=404)
|
509
|
-
err_msg = "Flavor Profile
|
508
|
+
err_msg = f"Flavor Profile {fp.get('id')} not found."
|
510
509
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
511
510
|
|
512
511
|
def test_delete_deleted_id(self):
|
@@ -552,7 +551,7 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
552
551
|
self.conf.config(group='api_settings', auth_strategy=auth_strategy)
|
553
552
|
response = self.get(self.FP_PATH.format(
|
554
553
|
fp_id=fp.get('id')), status=404)
|
555
|
-
err_msg = "Flavor Profile
|
554
|
+
err_msg = f"Flavor Profile {fp.get('id')} not found."
|
556
555
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
557
556
|
|
558
557
|
def test_delete_not_authorized(self):
|
@@ -578,8 +577,8 @@ class TestFlavorProfiles(base.BaseAPITest):
|
|
578
577
|
self.create_flavor('name1', 'description', fp.get('id'), True)
|
579
578
|
response = self.delete(self.FP_PATH.format(fp_id=fp.get('id')),
|
580
579
|
status=409)
|
581
|
-
err_msg = ("Flavor profile {} is in use and cannot be "
|
582
|
-
"modified."
|
580
|
+
err_msg = (f"Flavor profile {fp.get('id')} is in use and cannot be "
|
581
|
+
f"modified.")
|
583
582
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
584
583
|
response = self.get(
|
585
584
|
self.FP_PATH.format(fp_id=fp.get('id'))).json.get(self.root_tag)
|
@@ -184,16 +184,16 @@ class TestFlavors(base.BaseAPITest):
|
|
184
184
|
'fields': ['id', 'flavor_profile_id']}).json.get(self.root_tag)
|
185
185
|
self.assertEqual(flavor.get('id'), response.get('id'))
|
186
186
|
self.assertEqual(self.fp.get('id'), response.get('flavor_profile_id'))
|
187
|
-
self.assertIn(
|
188
|
-
self.assertIn(
|
189
|
-
self.assertNotIn(
|
190
|
-
self.assertNotIn(
|
191
|
-
self.assertNotIn(
|
187
|
+
self.assertIn('id', response)
|
188
|
+
self.assertIn('flavor_profile_id', response)
|
189
|
+
self.assertNotIn('name', response)
|
190
|
+
self.assertNotIn('description', response)
|
191
|
+
self.assertNotIn('enabled', response)
|
192
192
|
|
193
193
|
def test_get_one_deleted_id(self):
|
194
194
|
response = self.get(
|
195
195
|
self.FLAVOR_PATH.format(flavor_id=constants.NIL_UUID), status=404)
|
196
|
-
self.assertEqual('Flavor {} not found.'
|
196
|
+
self.assertEqual(f'Flavor {constants.NIL_UUID} not found.',
|
197
197
|
response.json.get('faultstring'))
|
198
198
|
|
199
199
|
def test_get_authorized(self):
|
@@ -214,7 +214,7 @@ class TestFlavors(base.BaseAPITest):
|
|
214
214
|
'is_admin_project': True,
|
215
215
|
'service_project_domain_id': None,
|
216
216
|
'service_project_id': None,
|
217
|
-
'roles': ['load-balancer_member'],
|
217
|
+
'roles': ['load-balancer_member', 'member'],
|
218
218
|
'user_id': None,
|
219
219
|
'is_admin': False,
|
220
220
|
'service_user_domain_id': None,
|
@@ -251,18 +251,18 @@ class TestFlavors(base.BaseAPITest):
|
|
251
251
|
True)
|
252
252
|
self.assertTrue(uuidutils.is_uuid_like(flavor1.get('id')))
|
253
253
|
ref_flavor_1 = {
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
254
|
+
'description': 'description', 'enabled': True,
|
255
|
+
'flavor_profile_id': self.fp.get('id'),
|
256
|
+
'id': flavor1.get('id'),
|
257
|
+
'name': 'name1'}
|
258
258
|
flavor2 = self.create_flavor('name2', 'description', self.fp.get('id'),
|
259
259
|
True)
|
260
260
|
self.assertTrue(uuidutils.is_uuid_like(flavor2.get('id')))
|
261
261
|
ref_flavor_2 = {
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
262
|
+
'description': 'description', 'enabled': True,
|
263
|
+
'flavor_profile_id': self.fp.get('id'),
|
264
|
+
'id': flavor2.get('id'),
|
265
|
+
'name': 'name2'}
|
266
266
|
response = self.get(self.FLAVORS_PATH)
|
267
267
|
api_list = response.json.get(self.root_tag_list)
|
268
268
|
self.assertEqual(2, len(api_list))
|
@@ -281,11 +281,11 @@ class TestFlavors(base.BaseAPITest):
|
|
281
281
|
api_list = response.json.get(self.root_tag_list)
|
282
282
|
self.assertEqual(2, len(api_list))
|
283
283
|
for flavor in api_list:
|
284
|
-
self.assertIn(
|
285
|
-
self.assertIn(
|
286
|
-
self.assertNotIn(
|
287
|
-
self.assertNotIn(
|
288
|
-
self.assertNotIn(
|
284
|
+
self.assertIn('id', flavor)
|
285
|
+
self.assertIn('name', flavor)
|
286
|
+
self.assertNotIn('flavor_profile_id', flavor)
|
287
|
+
self.assertNotIn('description', flavor)
|
288
|
+
self.assertNotIn('enabled', flavor)
|
289
289
|
|
290
290
|
def test_get_all_authorized(self):
|
291
291
|
flavor1 = self.create_flavor('name1', 'description', self.fp.get('id'),
|
@@ -308,7 +308,7 @@ class TestFlavors(base.BaseAPITest):
|
|
308
308
|
'is_admin_project': True,
|
309
309
|
'service_project_domain_id': None,
|
310
310
|
'service_project_id': None,
|
311
|
-
'roles': ['load-balancer_member'],
|
311
|
+
'roles': ['load-balancer_member', 'member'],
|
312
312
|
'user_id': None,
|
313
313
|
'is_admin': False,
|
314
314
|
'service_user_domain_id': None,
|
@@ -368,7 +368,7 @@ class TestFlavors(base.BaseAPITest):
|
|
368
368
|
response = self.put(
|
369
369
|
self.FLAVOR_PATH.format(flavor_id=constants.NIL_UUID), body,
|
370
370
|
status=404)
|
371
|
-
self.assertEqual('Flavor {} not found.'
|
371
|
+
self.assertEqual(f'Flavor {constants.NIL_UUID} not found.',
|
372
372
|
response.json.get('faultstring'))
|
373
373
|
|
374
374
|
def test_update_none(self):
|
@@ -510,7 +510,7 @@ class TestFlavors(base.BaseAPITest):
|
|
510
510
|
self.delete(self.FLAVOR_PATH.format(flavor_id=flavor.get('id')))
|
511
511
|
response = self.get(self.FLAVOR_PATH.format(
|
512
512
|
flavor_id=flavor.get('id')), status=404)
|
513
|
-
err_msg = "Flavor
|
513
|
+
err_msg = f"Flavor {flavor.get('id')} not found."
|
514
514
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
515
515
|
|
516
516
|
def test_delete_nonexistent_id(self):
|
@@ -522,7 +522,7 @@ class TestFlavors(base.BaseAPITest):
|
|
522
522
|
def test_delete_deleted_id(self):
|
523
523
|
response = self.delete(
|
524
524
|
self.FLAVOR_PATH.format(flavor_id=constants.NIL_UUID), status=404)
|
525
|
-
self.assertEqual('Flavor {} not found.'
|
525
|
+
self.assertEqual(f'Flavor {constants.NIL_UUID} not found.',
|
526
526
|
response.json.get('faultstring'))
|
527
527
|
|
528
528
|
def test_delete_authorized(self):
|
@@ -557,7 +557,7 @@ class TestFlavors(base.BaseAPITest):
|
|
557
557
|
self.conf.config(group='api_settings', auth_strategy=auth_strategy)
|
558
558
|
response = self.get(self.FLAVOR_PATH.format(
|
559
559
|
flavor_id=flavor.get('id')), status=404)
|
560
|
-
err_msg = "Flavor
|
560
|
+
err_msg = f"Flavor {flavor.get('id')} not found."
|
561
561
|
self.assertEqual(err_msg, response.json.get('faultstring'))
|
562
562
|
|
563
563
|
def test_delete_not_authorized(self):
|
@@ -137,7 +137,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
137
137
|
'is_admin_project': True,
|
138
138
|
'service_project_domain_id': None,
|
139
139
|
'service_project_id': None,
|
140
|
-
'roles': ['load-balancer_member'],
|
140
|
+
'roles': ['load-balancer_member', 'member'],
|
141
141
|
'user_id': None,
|
142
142
|
'is_admin': False,
|
143
143
|
'service_user_domain_id': None,
|
@@ -293,7 +293,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
293
293
|
'is_admin_project': True,
|
294
294
|
'service_project_domain_id': None,
|
295
295
|
'service_project_id': None,
|
296
|
-
'roles': ['load-balancer_member'],
|
296
|
+
'roles': ['load-balancer_member', 'member'],
|
297
297
|
'user_id': None,
|
298
298
|
'is_admin': False,
|
299
299
|
'service_user_domain_id': None,
|
@@ -688,9 +688,9 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
688
688
|
hms = self.get(self.HMS_PATH, params={
|
689
689
|
'fields': ['id', 'project_id']}).json
|
690
690
|
for hm in hms['healthmonitors']:
|
691
|
-
self.assertIn(
|
692
|
-
self.assertIn(
|
693
|
-
self.assertNotIn(
|
691
|
+
self.assertIn('id', hm)
|
692
|
+
self.assertIn('project_id', hm)
|
693
|
+
self.assertNotIn('description', hm)
|
694
694
|
|
695
695
|
def test_get_one_fields_filter(self):
|
696
696
|
pool1 = self.create_pool(
|
@@ -709,9 +709,9 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
709
709
|
hm = self.get(
|
710
710
|
self.HM_PATH.format(healthmonitor_id=hm1.get('id')),
|
711
711
|
params={'fields': ['id', 'project_id']}).json.get(self.root_tag)
|
712
|
-
self.assertIn(
|
713
|
-
self.assertIn(
|
714
|
-
self.assertNotIn(
|
712
|
+
self.assertIn('id', hm)
|
713
|
+
self.assertIn('project_id', hm)
|
714
|
+
self.assertNotIn('description', hm)
|
715
715
|
|
716
716
|
def test_get_all_filter(self):
|
717
717
|
pool1 = self.create_pool(
|
@@ -1258,7 +1258,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1258
1258
|
'is_admin_project': True,
|
1259
1259
|
'service_project_domain_id': None,
|
1260
1260
|
'service_project_id': None,
|
1261
|
-
'roles': ['load-balancer_member'],
|
1261
|
+
'roles': ['load-balancer_member', 'member'],
|
1262
1262
|
'user_id': None,
|
1263
1263
|
'is_admin': False,
|
1264
1264
|
'service_user_domain_id': None,
|
@@ -1323,7 +1323,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1323
1323
|
provisioning_status=constants.ERROR)
|
1324
1324
|
api_hm = self.create_health_monitor(
|
1325
1325
|
pool1_id, constants.HEALTH_MONITOR_HTTP, 1, 1, 1, 1, status=409)
|
1326
|
-
ref_msg = 'Pool
|
1326
|
+
ref_msg = f'Pool {pool1_id} is immutable and cannot be updated.'
|
1327
1327
|
self.assertEqual(ref_msg, api_hm.get('faultstring'))
|
1328
1328
|
|
1329
1329
|
def test_create_with_listener(self):
|
@@ -1714,7 +1714,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1714
1714
|
'is_admin_project': True,
|
1715
1715
|
'service_project_domain_id': None,
|
1716
1716
|
'service_project_id': None,
|
1717
|
-
'roles': ['load-balancer_member'],
|
1717
|
+
'roles': ['load-balancer_member', 'member'],
|
1718
1718
|
'user_id': None,
|
1719
1719
|
'is_admin': False,
|
1720
1720
|
'service_user_domain_id': None,
|
@@ -1782,6 +1782,24 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1782
1782
|
pool_prov_status=constants.PENDING_UPDATE,
|
1783
1783
|
hm_prov_status=constants.PENDING_UPDATE)
|
1784
1784
|
|
1785
|
+
def test_update_udp_case_with_udp_hm(self):
|
1786
|
+
api_hm = self.create_health_monitor(
|
1787
|
+
self.udp_pool_with_listener_id,
|
1788
|
+
constants.HEALTH_MONITOR_UDP_CONNECT, 3, 1, 1, 1).get(
|
1789
|
+
self.root_tag)
|
1790
|
+
self.set_lb_status(self.udp_lb_id)
|
1791
|
+
new_hm = {'timeout': 2}
|
1792
|
+
self.put(
|
1793
|
+
self.HM_PATH.format(healthmonitor_id=api_hm.get('id')),
|
1794
|
+
self._build_body(new_hm))
|
1795
|
+
self.assert_correct_status(
|
1796
|
+
lb_id=self.udp_lb_id, listener_id=self.udp_listener_id,
|
1797
|
+
pool_id=self.udp_pool_with_listener_id, hm_id=api_hm.get('id'),
|
1798
|
+
lb_prov_status=constants.PENDING_UPDATE,
|
1799
|
+
listener_prov_status=constants.PENDING_UPDATE,
|
1800
|
+
pool_prov_status=constants.PENDING_UPDATE,
|
1801
|
+
hm_prov_status=constants.PENDING_UPDATE)
|
1802
|
+
|
1785
1803
|
def test_negative_update_udp_case(self):
|
1786
1804
|
api_hm = self.create_health_monitor(
|
1787
1805
|
self.udp_pool_with_listener_id,
|
@@ -1834,8 +1852,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1834
1852
|
1, 1, 1, 1).get(self.root_tag)
|
1835
1853
|
new_hm = {constants.DELAY: None}
|
1836
1854
|
self.set_lb_status(self.lb_id)
|
1837
|
-
expect_error_msg =
|
1838
|
-
constants.DELAY)
|
1855
|
+
expect_error_msg = f"None is not a valid option for {constants.DELAY}"
|
1839
1856
|
res = self.put(self.HM_PATH.format(healthmonitor_id=api_hm.get('id')),
|
1840
1857
|
self._build_body(new_hm), status=400)
|
1841
1858
|
self.assertEqual(expect_error_msg, res.json['faultstring'])
|
@@ -1846,8 +1863,8 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1846
1863
|
1, 1, 1, 1).get(self.root_tag)
|
1847
1864
|
new_hm = {constants.MAX_RETRIES: None}
|
1848
1865
|
self.set_lb_status(self.lb_id)
|
1849
|
-
expect_error_msg = ("None is not a valid option for
|
1850
|
-
constants.MAX_RETRIES)
|
1866
|
+
expect_error_msg = (f"None is not a valid option for "
|
1867
|
+
f"{constants.MAX_RETRIES}")
|
1851
1868
|
res = self.put(self.HM_PATH.format(healthmonitor_id=api_hm.get('id')),
|
1852
1869
|
self._build_body(new_hm), status=400)
|
1853
1870
|
self.assertEqual(expect_error_msg, res.json['faultstring'])
|
@@ -1858,8 +1875,8 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
1858
1875
|
1, 1, 1, 1).get(self.root_tag)
|
1859
1876
|
new_hm = {constants.TIMEOUT: None}
|
1860
1877
|
self.set_lb_status(self.lb_id)
|
1861
|
-
expect_error_msg = ("None is not a valid option for
|
1862
|
-
constants.TIMEOUT)
|
1878
|
+
expect_error_msg = (f"None is not a valid option for "
|
1879
|
+
f"{constants.TIMEOUT}")
|
1863
1880
|
res = self.put(self.HM_PATH.format(healthmonitor_id=api_hm.get('id')),
|
1864
1881
|
self._build_body(new_hm), status=400)
|
1865
1882
|
self.assertEqual(expect_error_msg, res.json['faultstring'])
|
@@ -2047,7 +2064,7 @@ class TestHealthMonitor(base.BaseAPITest):
|
|
2047
2064
|
'is_admin_project': True,
|
2048
2065
|
'service_project_domain_id': None,
|
2049
2066
|
'service_project_id': None,
|
2050
|
-
'roles': ['load-balancer_member'],
|
2067
|
+
'roles': ['load-balancer_member', 'member'],
|
2051
2068
|
'user_id': None,
|
2052
2069
|
'is_admin': False,
|
2053
2070
|
'service_user_domain_id': None,
|