Review: Needs Information
Diff comments: > diff --git a/stubs/netaddr/ip/__init__.pyi b/stubs/netaddr/ip/__init__.pyi > new file mode 100644 > index 0000000..034d875 > --- /dev/null > +++ b/stubs/netaddr/ip/__init__.pyi hmm, are we sure we need this? i see typeshed has an entry for netaddr e.g. https://github.com/python/typeshed/blob/main/stubs/netaddr/netaddr/ip/__init__.pyi#L99 > @@ -0,0 +1,23 @@ > +from __future__ import annotations > + > +from typing import Optional, Iterable > + > + > +class IPNetwork: > + broadcast: str > + cidr: str > + first: int > + hostmask: str > + ip: str > + last: int > + netmask: str > + network: str > + prefixlen: int > + def __init__( > + self, > + addr: str, > + implicit_prefix: Optional[bool] = ..., > + version: Optional[int] = ..., > + flags: Optional[Iterable[int]] = ..., > + ) -> None: ... > + def next(self, step: int = ...) -> IPNetwork: ... > diff --git a/systemtests/chaos.py b/systemtests/chaos.py > new file mode 100644 > index 0000000..ffec41a > --- /dev/null > +++ b/systemtests/chaos.py > @@ -0,0 +1,19 @@ > +import random > +from typing import List shouldn't be needed - make sure you add a 'from __future__ import annotations' and just use 'list[Instance]', 'list[AnsibleHost]', below > + > +from .ansible import AnsibleHost > +from .lxd import Instance > + > + > +class ChaosMixin: > + def down_a_host(self, host: Instance) -> None: > + host.stop(force=True) > + > + def down_random_host(self, hosts: List[Instance]) -> None: > + target_host = random.choice(hosts) > + self.down_a_host(target_host) > + > + def down_postgres_primary(self, ansible_hosts: List[AnsibleHost]) -> > None: > + for host in ansible_hosts: > + if host.is_postgres_primary: > + self.down_a_host(host.instance) -- https://code.launchpad.net/~cgrabowski/maas-ci/+git/system-tests/+merge/438502 Your team MAAS Committers is subscribed to branch ~maas-committers/maas-ci/+git/system-tests:master. -- Mailing list: https://launchpad.net/~sts-sponsors Post to : [email protected] Unsubscribe : https://launchpad.net/~sts-sponsors More help : https://help.launchpad.net/ListHelp

