octavia 14.0.0.0rc1__py3-none-any.whl → 15.0.0.0rc1__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.0rc1.dist-info}/AUTHORS +6 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.0rc1.dist-info}/METADATA +3 -5
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.0rc1.dist-info}/RECORD +302 -305
- octavia-15.0.0.0rc1.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.0rc1.data}/data/share/octavia/LICENSE +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/README.rst +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/README.rst +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/diskimage-create.sh +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/image-tests.sh +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/requirements.txt +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/test-requirements.txt +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/tox.ini +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/data/share/octavia/diskimage-create/version.txt +0 -0
- {octavia-14.0.0.0rc1.data → octavia-15.0.0.0rc1.data}/scripts/octavia-wsgi +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.0rc1.dist-info}/LICENSE +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.0rc1.dist-info}/WHEEL +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.0rc1.dist-info}/entry_points.txt +0 -0
- {octavia-14.0.0.0rc1.dist-info → octavia-15.0.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -1262,8 +1262,7 @@ def sample_base_expected_config(frontend=None, logging=None, backend=None,
|
|
1262
1262
|
if peers is None:
|
1263
1263
|
peers = "\n\n"
|
1264
1264
|
if global_opts is None:
|
1265
|
-
global_opts = " maxconn {
|
1266
|
-
maxconn=constants.HAPROXY_DEFAULT_MAXCONN)
|
1265
|
+
global_opts = f" maxconn {constants.HAPROXY_DEFAULT_MAXCONN}\n\n"
|
1267
1266
|
if defaults is None:
|
1268
1267
|
defaults = ("defaults\n"
|
1269
1268
|
" log global\n"
|
@@ -92,7 +92,7 @@ class TestTaskFlowServiceController(base.TestCase):
|
|
92
92
|
def test_run_poster(self, mock_engines, mockuuid):
|
93
93
|
flow_factory = mock.MagicMock()
|
94
94
|
flow_factory.__name__ = 'testname'
|
95
|
-
job_name = 'testname
|
95
|
+
job_name = f'testname-{self._mock_uuid}'
|
96
96
|
job_details = {'store': 'test'}
|
97
97
|
with mock.patch.object(self.service_controller, '_wait_for_job'
|
98
98
|
) as wait:
|
@@ -23,13 +23,13 @@ import octavia.tests.unit.base as base
|
|
23
23
|
class TestDecorator(base.TestCase):
|
24
24
|
|
25
25
|
@dec.rename_kwargs(a='z')
|
26
|
-
class TestClass
|
26
|
+
class TestClass:
|
27
27
|
def __init__(self, x, z=None):
|
28
28
|
self.x = x
|
29
29
|
self.z = z
|
30
30
|
|
31
31
|
@dec.rename_kwargs(a='z')
|
32
|
-
class TestClassDupe
|
32
|
+
class TestClassDupe:
|
33
33
|
def __init__(self, x, z=None):
|
34
34
|
self.x = x
|
35
35
|
self.z = z
|
@@ -164,23 +164,20 @@ class PolicyTestCase(base.TestCase):
|
|
164
164
|
def test_check_is_admin_fail(self):
|
165
165
|
self.assertFalse(policy.get_enforcer().check_is_admin(self.context))
|
166
166
|
|
167
|
-
# TODO(johnsom) When oslo.policy changes "enforce_new_defaults" to True
|
168
|
-
# this test will fail as "system_scope:all" will be required.
|
169
|
-
# This test and the conditional in common/policy.py can then
|
170
|
-
# be removed in favor of test_check_is_admin_new_defaults().
|
171
167
|
def test_check_is_admin(self):
|
172
168
|
self.context = context.RequestContext('admin', project_id='fake',
|
173
169
|
roles=['AdMiN'])
|
174
170
|
|
175
171
|
self.assertTrue(policy.get_enforcer().check_is_admin(self.context))
|
176
172
|
|
177
|
-
def
|
173
|
+
def test_check_is_admin_with_system_scope_token(self):
|
178
174
|
conf = oslo_fixture.Config(config.cfg.CONF)
|
179
175
|
conf.config(group="oslo_policy", enforce_new_defaults=True)
|
176
|
+
conf.config(group="oslo_policy", enforce_scope=True)
|
180
177
|
self.context = context.RequestContext('admin', roles=['AdMiN'],
|
181
178
|
system_scope='all')
|
182
179
|
|
183
|
-
self.
|
180
|
+
self.assertFalse(policy.get_enforcer().check_is_admin(self.context))
|
184
181
|
|
185
182
|
def test_get_enforcer(self):
|
186
183
|
self.assertTrue(isinstance(policy.get_no_context_enforcer(),
|
@@ -246,7 +246,10 @@ class TestTLSParseUtils(base.TestCase):
|
|
246
246
|
|
247
247
|
def test_get_cert_expiration(self):
|
248
248
|
exp_date = cert_parser.get_cert_expiration(sample_certs.X509_EXPIRED)
|
249
|
-
self.assertEqual(
|
249
|
+
self.assertEqual(
|
250
|
+
datetime.datetime(2016, 9, 25, 18, 1, 54,
|
251
|
+
tzinfo=datetime.timezone.utc),
|
252
|
+
exp_date)
|
250
253
|
|
251
254
|
# test the exception
|
252
255
|
self.assertRaises(exceptions.UnreadableCert,
|
@@ -44,15 +44,14 @@ class TestListenerFlows(base.TestCase):
|
|
44
44
|
|
45
45
|
self.assertIn(constants.LISTENERS, listener_flow.requires)
|
46
46
|
self.assertIn(constants.LOADBALANCER_ID, listener_flow.requires)
|
47
|
-
self.assertIn(constants.AMPHORAE_STATUS, listener_flow.requires)
|
48
47
|
|
49
48
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG,
|
50
49
|
listener_flow.provides)
|
51
50
|
self.assertIn(constants.AMPHORAE, listener_flow.provides)
|
52
51
|
self.assertIn(constants.AMPHORA_FIREWALL_RULES, listener_flow.provides)
|
53
52
|
|
54
|
-
self.assertEqual(
|
55
|
-
self.assertEqual(
|
53
|
+
self.assertEqual(2, len(listener_flow.requires))
|
54
|
+
self.assertEqual(4, len(listener_flow.provides))
|
56
55
|
|
57
56
|
def test_get_delete_listener_flow(self, mock_get_net_driver):
|
58
57
|
flavor_dict = {
|
@@ -66,15 +65,14 @@ class TestListenerFlows(base.TestCase):
|
|
66
65
|
self.assertIn(constants.LISTENER, listener_flow.requires)
|
67
66
|
self.assertIn(constants.LOADBALANCER_ID, listener_flow.requires)
|
68
67
|
self.assertIn(constants.PROJECT_ID, listener_flow.requires)
|
69
|
-
self.assertIn(constants.AMPHORAE_STATUS, listener_flow.requires)
|
70
68
|
|
71
69
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG,
|
72
70
|
listener_flow.provides)
|
73
71
|
self.assertIn(constants.AMPHORAE, listener_flow.provides)
|
74
72
|
self.assertIn(constants.AMPHORA_FIREWALL_RULES, listener_flow.provides)
|
75
73
|
|
76
|
-
self.assertEqual(
|
77
|
-
self.assertEqual(
|
74
|
+
self.assertEqual(3, len(listener_flow.requires))
|
75
|
+
self.assertEqual(4, len(listener_flow.provides))
|
78
76
|
|
79
77
|
def test_get_delete_listener_internal_flow(self, mock_get_net_driver):
|
80
78
|
flavor_dict = {
|
@@ -88,15 +86,14 @@ class TestListenerFlows(base.TestCase):
|
|
88
86
|
|
89
87
|
self.assertIn(constants.LOADBALANCER_ID, listener_flow.requires)
|
90
88
|
self.assertIn(constants.PROJECT_ID, listener_flow.requires)
|
91
|
-
self.assertIn(constants.AMPHORAE_STATUS, listener_flow.requires)
|
92
89
|
|
93
90
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG,
|
94
91
|
listener_flow.provides)
|
95
92
|
self.assertIn(constants.AMPHORAE, listener_flow.provides)
|
96
93
|
self.assertIn(constants.AMPHORA_FIREWALL_RULES, listener_flow.provides)
|
97
94
|
|
98
|
-
self.assertEqual(
|
99
|
-
self.assertEqual(
|
95
|
+
self.assertEqual(2, len(listener_flow.requires))
|
96
|
+
self.assertEqual(4, len(listener_flow.provides))
|
100
97
|
|
101
98
|
def test_get_update_listener_flow(self, mock_get_net_driver):
|
102
99
|
flavor_dict = {
|
@@ -112,15 +109,14 @@ class TestListenerFlows(base.TestCase):
|
|
112
109
|
self.assertIn(constants.UPDATE_DICT, listener_flow.requires)
|
113
110
|
self.assertIn(constants.LISTENERS, listener_flow.requires)
|
114
111
|
self.assertIn(constants.LOADBALANCER_ID, listener_flow.requires)
|
115
|
-
self.assertIn(constants.AMPHORAE_STATUS, listener_flow.requires)
|
116
112
|
|
117
113
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG,
|
118
114
|
listener_flow.provides)
|
119
115
|
self.assertIn(constants.AMPHORAE, listener_flow.provides)
|
120
116
|
self.assertIn(constants.AMPHORA_FIREWALL_RULES, listener_flow.provides)
|
121
117
|
|
122
|
-
self.assertEqual(
|
123
|
-
self.assertEqual(
|
118
|
+
self.assertEqual(4, len(listener_flow.requires))
|
119
|
+
self.assertEqual(4, len(listener_flow.provides))
|
124
120
|
|
125
121
|
def test_get_create_all_listeners_flow(self, mock_get_net_driver):
|
126
122
|
flavor_dict = {
|
@@ -131,12 +127,11 @@ class TestListenerFlows(base.TestCase):
|
|
131
127
|
self.assertIsInstance(listeners_flow, flow.Flow)
|
132
128
|
self.assertIn(constants.LOADBALANCER, listeners_flow.requires)
|
133
129
|
self.assertIn(constants.LOADBALANCER_ID, listeners_flow.requires)
|
134
|
-
self.assertIn(constants.AMPHORAE_STATUS, listeners_flow.requires)
|
135
130
|
self.assertIn(constants.LOADBALANCER, listeners_flow.provides)
|
136
131
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG,
|
137
132
|
listeners_flow.provides)
|
138
133
|
self.assertIn(constants.AMPHORAE, listeners_flow.provides)
|
139
134
|
self.assertIn(constants.AMPHORA_FIREWALL_RULES,
|
140
135
|
listeners_flow.provides)
|
141
|
-
self.assertEqual(
|
142
|
-
self.assertEqual(
|
136
|
+
self.assertEqual(2, len(listeners_flow.requires))
|
137
|
+
self.assertEqual(6, len(listeners_flow.provides))
|
@@ -344,7 +344,6 @@ class TestLoadBalancerFlows(base.TestCase):
|
|
344
344
|
self.assertIn(constants.FLAVOR, failover_flow.requires)
|
345
345
|
self.assertIn(constants.LOADBALANCER, failover_flow.requires)
|
346
346
|
self.assertIn(constants.LOADBALANCER_ID, failover_flow.requires)
|
347
|
-
self.assertIn(constants.AMPHORAE_STATUS, failover_flow.requires)
|
348
347
|
|
349
348
|
self.assertIn(constants.UPDATED_PORTS, failover_flow.provides)
|
350
349
|
self.assertIn(constants.AMPHORA, failover_flow.provides)
|
@@ -364,9 +363,9 @@ class TestLoadBalancerFlows(base.TestCase):
|
|
364
363
|
self.assertIn(constants.SUBNET, failover_flow.provides)
|
365
364
|
self.assertIn(constants.NEW_AMPHORAE, failover_flow.provides)
|
366
365
|
|
367
|
-
self.assertEqual(
|
366
|
+
self.assertEqual(6, len(failover_flow.requires),
|
368
367
|
failover_flow.requires)
|
369
|
-
self.assertEqual(
|
368
|
+
self.assertEqual(17, len(failover_flow.provides),
|
370
369
|
failover_flow.provides)
|
371
370
|
|
372
371
|
@mock.patch('octavia.common.rpc.NOTIFIER',
|
@@ -424,7 +423,6 @@ class TestLoadBalancerFlows(base.TestCase):
|
|
424
423
|
self.assertIn(constants.FLAVOR, failover_flow.requires)
|
425
424
|
self.assertIn(constants.LOADBALANCER, failover_flow.requires)
|
426
425
|
self.assertIn(constants.LOADBALANCER_ID, failover_flow.requires)
|
427
|
-
self.assertIn(constants.AMPHORAE_STATUS, failover_flow.requires)
|
428
426
|
|
429
427
|
self.assertIn(constants.UPDATED_PORTS, failover_flow.provides)
|
430
428
|
self.assertIn(constants.AMPHORA, failover_flow.provides)
|
@@ -445,9 +443,9 @@ class TestLoadBalancerFlows(base.TestCase):
|
|
445
443
|
self.assertIn(constants.SUBNET, failover_flow.provides)
|
446
444
|
self.assertIn(constants.NEW_AMPHORAE, failover_flow.provides)
|
447
445
|
|
448
|
-
self.assertEqual(
|
446
|
+
self.assertEqual(6, len(failover_flow.requires),
|
449
447
|
failover_flow.requires)
|
450
|
-
self.assertEqual(
|
448
|
+
self.assertEqual(17, len(failover_flow.provides),
|
451
449
|
failover_flow.provides)
|
452
450
|
|
453
451
|
@mock.patch('octavia.common.rpc.NOTIFIER',
|
@@ -1670,7 +1670,11 @@ class TestNetworkTasks(base.TestCase):
|
|
1670
1670
|
# Test revert
|
1671
1671
|
mock_driver.reset_mock()
|
1672
1672
|
|
1673
|
-
|
1673
|
+
# The execute path generates a port dict, so this will be the result
|
1674
|
+
# passed into the revert method by Taskflow
|
1675
|
+
port_dict = {constants.ID: PORT_ID}
|
1676
|
+
|
1677
|
+
net_task.revert(port_dict, vip_dict, VIP_SG_ID, AMP_ID,
|
1674
1678
|
additional_vips)
|
1675
1679
|
|
1676
1680
|
mock_driver.delete_port.assert_called_once_with(PORT_ID)
|
@@ -1678,7 +1682,7 @@ class TestNetworkTasks(base.TestCase):
|
|
1678
1682
|
# Test revert exception
|
1679
1683
|
mock_driver.reset_mock()
|
1680
1684
|
|
1681
|
-
net_task.revert(
|
1685
|
+
net_task.revert(port_dict, vip_dict, VIP_SG_ID, AMP_ID,
|
1682
1686
|
additional_vips)
|
1683
1687
|
|
1684
1688
|
mock_driver.delete_port.assert_called_once_with(PORT_ID)
|
@@ -27,7 +27,7 @@ from octavia.controller.worker.v2 import controller_worker
|
|
27
27
|
from octavia.controller.worker.v2.flows import flow_utils
|
28
28
|
import octavia.tests.unit.base as base
|
29
29
|
|
30
|
-
|
30
|
+
TLS_CERT_ID = uuidutils.generate_uuid()
|
31
31
|
AMP_ID = uuidutils.generate_uuid()
|
32
32
|
LB_ID = uuidutils.generate_uuid()
|
33
33
|
LISTENER_ID = uuidutils.generate_uuid()
|
@@ -804,6 +804,61 @@ class TestControllerWorker(base.TestCase):
|
|
804
804
|
})
|
805
805
|
)
|
806
806
|
|
807
|
+
@mock.patch(
|
808
|
+
"octavia.common.tls_utils.cert_parser.load_certificates_data",
|
809
|
+
side_effect=RuntimeError
|
810
|
+
)
|
811
|
+
def test_delete_load_balancer_with_cascade_tls_unavailable(
|
812
|
+
self,
|
813
|
+
mock_load_tls_cert,
|
814
|
+
mock_api_get_session,
|
815
|
+
mock_dyn_log_listener,
|
816
|
+
mock_taskflow_load,
|
817
|
+
mock_pool_repo_get,
|
818
|
+
mock_member_repo_get,
|
819
|
+
mock_l7rule_repo_get,
|
820
|
+
mock_l7policy_repo_get,
|
821
|
+
mock_listener_repo_get,
|
822
|
+
mock_lb_repo_get,
|
823
|
+
mock_health_mon_repo_get,
|
824
|
+
mock_amp_repo_get
|
825
|
+
):
|
826
|
+
_flow_mock.reset_mock()
|
827
|
+
|
828
|
+
_listener_mock.tls_certificate_id = TLS_CERT_ID
|
829
|
+
_listener_mock.to_dict.return_value[
|
830
|
+
constants.TLS_CERTIFICATE_ID] = TLS_CERT_ID
|
831
|
+
|
832
|
+
cw = controller_worker.ControllerWorker()
|
833
|
+
cw.delete_load_balancer(_load_balancer_mock, cascade=True)
|
834
|
+
|
835
|
+
mock_lb_repo_get.assert_called_once_with(
|
836
|
+
_db_session,
|
837
|
+
id=LB_ID)
|
838
|
+
|
839
|
+
# Check load_certificates_data called and error is raised
|
840
|
+
# Error must be ignored because it is not critical for current flow
|
841
|
+
mock_load_tls_cert.assert_called_once()
|
842
|
+
|
843
|
+
listener_list = [{constants.LISTENER_ID: LISTENER_ID,
|
844
|
+
constants.LOADBALANCER_ID: LB_ID,
|
845
|
+
constants.PROJECT_ID: PROJECT_ID,
|
846
|
+
"default_tls_container_ref": TLS_CERT_ID}]
|
847
|
+
|
848
|
+
(cw.services_controller.run_poster.
|
849
|
+
assert_called_once_with(
|
850
|
+
flow_utils.get_cascade_delete_load_balancer_flow,
|
851
|
+
_load_balancer_mock, listener_list, [],
|
852
|
+
store={constants.LOADBALANCER: _load_balancer_mock,
|
853
|
+
constants.LOADBALANCER_ID: LB_ID,
|
854
|
+
constants.SERVER_GROUP_ID:
|
855
|
+
_db_load_balancer_mock.server_group_id,
|
856
|
+
constants.PROJECT_ID: _db_load_balancer_mock.project_id,
|
857
|
+
})
|
858
|
+
)
|
859
|
+
|
860
|
+
_listener_mock.reset_mock()
|
861
|
+
|
807
862
|
@mock.patch('octavia.db.repositories.ListenerRepository.get_all',
|
808
863
|
return_value=([_listener_mock], None))
|
809
864
|
def test_update_load_balancer(self,
|
@@ -0,0 +1,348 @@
|
|
1
|
+
# Copyright 2024 NTT DATA Group Corporation
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
4
|
+
# not use this file except in compliance with the License. You may obtain
|
5
|
+
# a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
11
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
12
|
+
# License for the specific language governing permissions and limitations
|
13
|
+
# under the License.
|
14
|
+
#
|
15
|
+
from unittest import mock
|
16
|
+
|
17
|
+
from oslo_config import cfg
|
18
|
+
|
19
|
+
from octavia.controller.worker.v2 import taskflow_jobboard_driver
|
20
|
+
import octavia.tests.unit.base as base
|
21
|
+
|
22
|
+
|
23
|
+
class TestRedisTaskFlowDriver(base.TestCase):
|
24
|
+
|
25
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
26
|
+
'job_backends')
|
27
|
+
def test_job_board_default(self, mock_job_backends):
|
28
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
29
|
+
driver.job_board(None)
|
30
|
+
mock_job_backends.backend.assert_called_once_with(
|
31
|
+
'octavia_jobboard',
|
32
|
+
{
|
33
|
+
'board': 'redis',
|
34
|
+
'host': '127.0.0.1',
|
35
|
+
'port': 6379,
|
36
|
+
'namespace': 'octavia_jobboard',
|
37
|
+
'sentinel': None,
|
38
|
+
'sentinel_fallbacks': [],
|
39
|
+
'ssl': False,
|
40
|
+
'ssl_keyfile': None,
|
41
|
+
'ssl_certfile': None,
|
42
|
+
'ssl_ca_certs': None,
|
43
|
+
'ssl_cert_reqs': 'required',
|
44
|
+
'sentinel_kwargs': {
|
45
|
+
'ssl': False,
|
46
|
+
'ssl_keyfile': None,
|
47
|
+
'ssl_certfile': None,
|
48
|
+
'ssl_ca_certs': None,
|
49
|
+
'ssl_cert_reqs': 'required',
|
50
|
+
}
|
51
|
+
},
|
52
|
+
persistence=None
|
53
|
+
)
|
54
|
+
|
55
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
56
|
+
'job_backends')
|
57
|
+
def test_job_board_password(self, mock_job_backends):
|
58
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
59
|
+
cfg.CONF.set_override('jobboard_backend_password', 'redispass',
|
60
|
+
group='task_flow')
|
61
|
+
driver.job_board(None)
|
62
|
+
mock_job_backends.backend.assert_called_once_with(
|
63
|
+
'octavia_jobboard',
|
64
|
+
{
|
65
|
+
'board': 'redis',
|
66
|
+
'host': '127.0.0.1',
|
67
|
+
'port': 6379,
|
68
|
+
'namespace': 'octavia_jobboard',
|
69
|
+
'password': 'redispass',
|
70
|
+
'sentinel': None,
|
71
|
+
'sentinel_fallbacks': [],
|
72
|
+
'ssl': False,
|
73
|
+
'ssl_keyfile': None,
|
74
|
+
'ssl_certfile': None,
|
75
|
+
'ssl_ca_certs': None,
|
76
|
+
'ssl_cert_reqs': 'required',
|
77
|
+
'sentinel_kwargs': {
|
78
|
+
'ssl': False,
|
79
|
+
'ssl_keyfile': None,
|
80
|
+
'ssl_certfile': None,
|
81
|
+
'ssl_ca_certs': None,
|
82
|
+
'ssl_cert_reqs': 'required',
|
83
|
+
}
|
84
|
+
},
|
85
|
+
persistence=None
|
86
|
+
)
|
87
|
+
|
88
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
89
|
+
'job_backends')
|
90
|
+
def test_job_board_username(self, mock_job_backends):
|
91
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
92
|
+
cfg.CONF.set_override('jobboard_backend_password', 'redispass',
|
93
|
+
group='task_flow')
|
94
|
+
cfg.CONF.set_override('jobboard_backend_username', 'redisuser',
|
95
|
+
group='task_flow')
|
96
|
+
driver.job_board(None)
|
97
|
+
mock_job_backends.backend.assert_called_once_with(
|
98
|
+
'octavia_jobboard',
|
99
|
+
{
|
100
|
+
'board': 'redis',
|
101
|
+
'host': '127.0.0.1',
|
102
|
+
'port': 6379,
|
103
|
+
'namespace': 'octavia_jobboard',
|
104
|
+
'username': 'redisuser',
|
105
|
+
'password': 'redispass',
|
106
|
+
'sentinel': None,
|
107
|
+
'sentinel_fallbacks': [],
|
108
|
+
'ssl': False,
|
109
|
+
'ssl_keyfile': None,
|
110
|
+
'ssl_certfile': None,
|
111
|
+
'ssl_ca_certs': None,
|
112
|
+
'ssl_cert_reqs': 'required',
|
113
|
+
'sentinel_kwargs': {
|
114
|
+
'ssl': False,
|
115
|
+
'ssl_keyfile': None,
|
116
|
+
'ssl_certfile': None,
|
117
|
+
'ssl_ca_certs': None,
|
118
|
+
'ssl_cert_reqs': 'required',
|
119
|
+
}
|
120
|
+
},
|
121
|
+
persistence=None
|
122
|
+
)
|
123
|
+
|
124
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
125
|
+
'job_backends')
|
126
|
+
def test_job_board_ssl(self, mock_job_backends):
|
127
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
128
|
+
cfg.CONF.set_override(
|
129
|
+
'jobboard_redis_backend_ssl_options',
|
130
|
+
{
|
131
|
+
'ssl': True,
|
132
|
+
'ssl_keyfile': 'rediskey',
|
133
|
+
'ssl_certfile': 'rediscert',
|
134
|
+
'ssl_ca_certs': 'redisca',
|
135
|
+
'ssl_cert_reqs': 'required'
|
136
|
+
},
|
137
|
+
group='task_flow')
|
138
|
+
driver.job_board(None)
|
139
|
+
mock_job_backends.backend.assert_called_once_with(
|
140
|
+
'octavia_jobboard',
|
141
|
+
{
|
142
|
+
'board': 'redis',
|
143
|
+
'host': '127.0.0.1',
|
144
|
+
'port': 6379,
|
145
|
+
'namespace': 'octavia_jobboard',
|
146
|
+
'sentinel': None,
|
147
|
+
'sentinel_fallbacks': [],
|
148
|
+
'ssl': True,
|
149
|
+
'ssl_keyfile': 'rediskey',
|
150
|
+
'ssl_certfile': 'rediscert',
|
151
|
+
'ssl_ca_certs': 'redisca',
|
152
|
+
'ssl_cert_reqs': 'required',
|
153
|
+
'sentinel_kwargs': {
|
154
|
+
'ssl': False,
|
155
|
+
'ssl_keyfile': None,
|
156
|
+
'ssl_certfile': None,
|
157
|
+
'ssl_ca_certs': None,
|
158
|
+
'ssl_cert_reqs': 'required',
|
159
|
+
}
|
160
|
+
},
|
161
|
+
persistence=None
|
162
|
+
)
|
163
|
+
|
164
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
165
|
+
'job_backends')
|
166
|
+
def test_job_board_sentinel(self, mock_job_backends):
|
167
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
168
|
+
cfg.CONF.set_override('jobboard_redis_sentinel', 'mymaster',
|
169
|
+
group='task_flow')
|
170
|
+
cfg.CONF.set_override('jobboard_backend_hosts',
|
171
|
+
['host1', 'host2', 'host3'],
|
172
|
+
group='task_flow')
|
173
|
+
cfg.CONF.set_override('jobboard_backend_port', 26379,
|
174
|
+
group='task_flow')
|
175
|
+
driver.job_board(None)
|
176
|
+
mock_job_backends.backend.assert_called_once_with(
|
177
|
+
'octavia_jobboard',
|
178
|
+
{
|
179
|
+
'board': 'redis',
|
180
|
+
'host': 'host1',
|
181
|
+
'port': 26379,
|
182
|
+
'namespace': 'octavia_jobboard',
|
183
|
+
'sentinel': 'mymaster',
|
184
|
+
'sentinel_fallbacks': ['host2:26379', 'host3:26379'],
|
185
|
+
'ssl': False,
|
186
|
+
'ssl_keyfile': None,
|
187
|
+
'ssl_certfile': None,
|
188
|
+
'ssl_ca_certs': None,
|
189
|
+
'ssl_cert_reqs': 'required',
|
190
|
+
'sentinel_kwargs': {
|
191
|
+
'ssl': False,
|
192
|
+
'ssl_keyfile': None,
|
193
|
+
'ssl_certfile': None,
|
194
|
+
'ssl_ca_certs': None,
|
195
|
+
'ssl_cert_reqs': 'required',
|
196
|
+
}
|
197
|
+
},
|
198
|
+
persistence=None
|
199
|
+
)
|
200
|
+
|
201
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
202
|
+
'job_backends')
|
203
|
+
def test_job_board_sentinel_password(self, mock_job_backends):
|
204
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
205
|
+
cfg.CONF.set_override('jobboard_redis_sentinel', 'mymaster',
|
206
|
+
group='task_flow')
|
207
|
+
cfg.CONF.set_override('jobboard_backend_hosts',
|
208
|
+
['host1', 'host2', 'host3'],
|
209
|
+
group='task_flow')
|
210
|
+
cfg.CONF.set_override('jobboard_backend_port', 26379,
|
211
|
+
group='task_flow')
|
212
|
+
cfg.CONF.set_override('jobboard_backend_password', 'redispass',
|
213
|
+
group='task_flow')
|
214
|
+
cfg.CONF.set_override('jobboard_redis_sentinel_password',
|
215
|
+
'sentinelpass', group='task_flow')
|
216
|
+
driver.job_board(None)
|
217
|
+
mock_job_backends.backend.assert_called_once_with(
|
218
|
+
'octavia_jobboard',
|
219
|
+
{
|
220
|
+
'board': 'redis',
|
221
|
+
'host': 'host1',
|
222
|
+
'port': 26379,
|
223
|
+
'namespace': 'octavia_jobboard',
|
224
|
+
'password': 'redispass',
|
225
|
+
'sentinel': 'mymaster',
|
226
|
+
'sentinel_fallbacks': ['host2:26379', 'host3:26379'],
|
227
|
+
'ssl': False,
|
228
|
+
'ssl_keyfile': None,
|
229
|
+
'ssl_certfile': None,
|
230
|
+
'ssl_ca_certs': None,
|
231
|
+
'ssl_cert_reqs': 'required',
|
232
|
+
'sentinel_kwargs': {
|
233
|
+
'password': 'sentinelpass',
|
234
|
+
'ssl': False,
|
235
|
+
'ssl_keyfile': None,
|
236
|
+
'ssl_certfile': None,
|
237
|
+
'ssl_ca_certs': None,
|
238
|
+
'ssl_cert_reqs': 'required',
|
239
|
+
}
|
240
|
+
},
|
241
|
+
persistence=None
|
242
|
+
)
|
243
|
+
|
244
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
245
|
+
'job_backends')
|
246
|
+
def test_job_board_sentinel_username(self, mock_job_backends):
|
247
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
248
|
+
cfg.CONF.set_override('jobboard_redis_sentinel', 'mymaster',
|
249
|
+
group='task_flow')
|
250
|
+
cfg.CONF.set_override('jobboard_backend_hosts',
|
251
|
+
['host1', 'host2', 'host3'],
|
252
|
+
group='task_flow')
|
253
|
+
cfg.CONF.set_override('jobboard_backend_port', 26379,
|
254
|
+
group='task_flow')
|
255
|
+
cfg.CONF.set_override('jobboard_backend_username', 'redisuser',
|
256
|
+
group='task_flow')
|
257
|
+
cfg.CONF.set_override('jobboard_backend_password', 'redispass',
|
258
|
+
group='task_flow')
|
259
|
+
cfg.CONF.set_override('jobboard_redis_sentinel_username',
|
260
|
+
'sentineluser', group='task_flow')
|
261
|
+
cfg.CONF.set_override('jobboard_redis_sentinel_password',
|
262
|
+
'sentinelpass', group='task_flow')
|
263
|
+
driver.job_board(None)
|
264
|
+
mock_job_backends.backend.assert_called_once_with(
|
265
|
+
'octavia_jobboard',
|
266
|
+
{
|
267
|
+
'board': 'redis',
|
268
|
+
'host': 'host1',
|
269
|
+
'port': 26379,
|
270
|
+
'namespace': 'octavia_jobboard',
|
271
|
+
'username': 'redisuser',
|
272
|
+
'password': 'redispass',
|
273
|
+
'sentinel': 'mymaster',
|
274
|
+
'sentinel_fallbacks': ['host2:26379', 'host3:26379'],
|
275
|
+
'ssl': False,
|
276
|
+
'ssl_keyfile': None,
|
277
|
+
'ssl_certfile': None,
|
278
|
+
'ssl_ca_certs': None,
|
279
|
+
'ssl_cert_reqs': 'required',
|
280
|
+
'sentinel_kwargs': {
|
281
|
+
'username': 'sentineluser',
|
282
|
+
'password': 'sentinelpass',
|
283
|
+
'ssl': False,
|
284
|
+
'ssl_keyfile': None,
|
285
|
+
'ssl_certfile': None,
|
286
|
+
'ssl_ca_certs': None,
|
287
|
+
'ssl_cert_reqs': 'required',
|
288
|
+
}
|
289
|
+
},
|
290
|
+
persistence=None
|
291
|
+
)
|
292
|
+
|
293
|
+
@mock.patch('octavia.controller.worker.v2.taskflow_jobboard_driver.'
|
294
|
+
'job_backends')
|
295
|
+
def test_job_board_sentinel_ssl(self, mock_job_backends):
|
296
|
+
driver = taskflow_jobboard_driver.RedisTaskFlowDriver(mock.Mock())
|
297
|
+
cfg.CONF.set_override('jobboard_redis_sentinel', 'mymaster',
|
298
|
+
group='task_flow')
|
299
|
+
cfg.CONF.set_override('jobboard_backend_hosts',
|
300
|
+
['host1', 'host2', 'host3'],
|
301
|
+
group='task_flow')
|
302
|
+
cfg.CONF.set_override('jobboard_backend_port', 26379,
|
303
|
+
group='task_flow')
|
304
|
+
cfg.CONF.set_override(
|
305
|
+
'jobboard_redis_backend_ssl_options',
|
306
|
+
{
|
307
|
+
'ssl': True,
|
308
|
+
'ssl_keyfile': 'rediskey',
|
309
|
+
'ssl_certfile': 'rediscert',
|
310
|
+
'ssl_ca_certs': 'redisca',
|
311
|
+
'ssl_cert_reqs': 'required'
|
312
|
+
},
|
313
|
+
group='task_flow')
|
314
|
+
cfg.CONF.set_override(
|
315
|
+
'jobboard_redis_sentinel_ssl_options',
|
316
|
+
{
|
317
|
+
'ssl': True,
|
318
|
+
'ssl_keyfile': 'sentinelkey',
|
319
|
+
'ssl_certfile': 'sentinelcert',
|
320
|
+
'ssl_ca_certs': 'sentinelca',
|
321
|
+
'ssl_cert_reqs': 'required'
|
322
|
+
},
|
323
|
+
group='task_flow')
|
324
|
+
driver.job_board(None)
|
325
|
+
mock_job_backends.backend.assert_called_once_with(
|
326
|
+
'octavia_jobboard',
|
327
|
+
{
|
328
|
+
'board': 'redis',
|
329
|
+
'host': 'host1',
|
330
|
+
'port': 26379,
|
331
|
+
'namespace': 'octavia_jobboard',
|
332
|
+
'sentinel': 'mymaster',
|
333
|
+
'sentinel_fallbacks': ['host2:26379', 'host3:26379'],
|
334
|
+
'ssl': True,
|
335
|
+
'ssl_keyfile': 'rediskey',
|
336
|
+
'ssl_certfile': 'rediscert',
|
337
|
+
'ssl_ca_certs': 'redisca',
|
338
|
+
'ssl_cert_reqs': 'required',
|
339
|
+
'sentinel_kwargs': {
|
340
|
+
'ssl': True,
|
341
|
+
'ssl_keyfile': 'sentinelkey',
|
342
|
+
'ssl_certfile': 'sentinelcert',
|
343
|
+
'ssl_ca_certs': 'sentinelca',
|
344
|
+
'ssl_cert_reqs': 'required'
|
345
|
+
}
|
346
|
+
},
|
347
|
+
persistence=None
|
348
|
+
)
|