juju_verify.verifiers.neutron_gateway module

neutron-gateway verification.

class juju_verify.verifiers.neutron_gateway.NeutronGateway(units: List[Unit], exclude_affected_units: Optional[List[Unit]] = None)

Bases: BaseVerifier

Implementation of verification checks for the neutron-gateway charm.

NAME = 'neutron-gateway'
action_name_failure_string_map = {'show-dhcp-networks': 'The following DHCP networks are non-redundant: {}', 'show-loadbalancers': 'The following LBaasV2 LBs were found: {}. LBaasV2 does not offer HA.', 'show-routers': 'The following routers are non-redundant: {}'}
action_name_result_map = {'show-dhcp-networks': 'dhcp-networks', 'show-loadbalancers': 'load-balancers', 'show-routers': 'router-list'}
check_non_redundant_resource(action_name: str) Result

Check that there are no non-redundant resources matching the resource type.

get_all_ngw_units() List[Unit]

Get all neutron-gateway units, including those not being shutdown.

get_online_resource_list(get_resource_action_name: str) List[dict]

Return a list of resources matching action, that will remain online.

get_resource_list(get_resource_action_name: str) List[dict]

Given a get resource action, return matching resources from all units.

get_shutdown_resource_list(get_resource_action_name: str) List[dict]

Return a list of resources matching action that are going to be shutdown.

classmethod get_unit_resource_list(unit: Unit, get_resource_action_name: str) Dict[str, Dict[str, Any]]

Given a get resource action, return the relevant resources on the unit.

model: Model
verify_reboot() Result

Verify that it’s safe to reboot selected neutron-gateway units.

verify_shutdown() Result

Verify that it’s safe to shutdown selected neutron-gateway units.

version_check() Result

Check minimum required version of Juju agents.

NeutronGateway verifier requires that all the neutron-gateway units run juju agent >=2.8.10 due to reliance on juju.Machine.hostname feature.

warn_lbaas_present() Result

Warn that LBaasV2 loadbalancers are present on the verified units.

warn_router_ha() Result

Warn that HA routers should be manually failed over.