SYMBOL INDEX (617 symbols across 60 files) FILE: build-scripts/generate-bom.py function _listdir (line 37) | def _listdir(dir: Path): function _parse_output (line 44) | def _parse_output(*args, **kwargs): function _read_file (line 48) | def _read_file(path: Path) -> str: FILE: build-scripts/print-patches-for.py class Version (line 16) | class Version: method __init__ (line 17) | def __init__(self, version_string: str): method equal_or_older_than (line 31) | def equal_or_older_than(self, v: "Version") -> bool: function find_suitable_patch_version (line 46) | def find_suitable_patch_version(candidates: list, target_version: Versio... function get_patches_for (line 74) | def get_patches_for(component: str, version_string: str, strict: bool) -... function main (line 107) | def main(): FILE: installer/cli/echo.py class Echo (line 29) | class Echo: method is_tty_connected (line 31) | def is_tty_connected() -> bool: method wrapped (line 36) | def wrapped(msg: str) -> None: method info (line 47) | def info(msg: str) -> None: method warning (line 54) | def warning(msg: str) -> None: method error (line 61) | def error(msg: str) -> None: method confirm (line 67) | def confirm( method prompt (line 92) | def prompt( FILE: installer/cli/microk8s.py function cli (line 30) | def cli(ctx, help): function show_error (line 77) | def show_error(): function show_help (line 85) | def show_help(): function _show_install_help (line 106) | def _show_install_help(): function memory (line 120) | def memory(mem_gb: str) -> int: function cpu (line 130) | def cpu(cpus: str) -> int: function disk (line 140) | def disk(disk_gb: str) -> int: function install (line 150) | def install(args) -> None: function uninstall (line 210) | def uninstall() -> None: function kubectl (line 236) | def kubectl(args) -> int: function inspect (line 245) | def inspect() -> None: function dashboard_proxy (line 283) | def dashboard_proxy() -> None: function start (line 343) | def start() -> None: function stop (line 354) | def stop() -> None: function run (line 364) | def run(cmd) -> None: function _not_installed (line 383) | def _not_installed(echo) -> None: function _get_microk8s_commands (line 388) | def _get_microk8s_commands() -> List: FILE: installer/common/auxiliary.py class Auxiliary (line 17) | class Auxiliary(ABC): method __init__ (line 22) | def __init__(self, args) -> None: method _free_disk_space (line 38) | def _free_disk_space() -> int: method _total_memory (line 47) | def _total_memory() -> int: method _cpu_count (line 56) | def _cpu_count() -> int: method has_enough_disk_space (line 64) | def has_enough_disk_space(self) -> bool: method has_enough_memory (line 72) | def has_enough_memory(self) -> bool: method has_enough_cpus (line 80) | def has_enough_cpus(self) -> bool: method get_kubectl_directory (line 88) | def get_kubectl_directory(self) -> str: method get_kubeconfig_path (line 98) | def get_kubeconfig_path(self) -> str: method kubectl (line 109) | def kubectl(self) -> int: class Windows (line 130) | class Windows(Auxiliary): method __init__ (line 135) | def __init__(self, args) -> None: method check_admin (line 143) | def check_admin() -> bool: method check_hyperv (line 152) | def check_hyperv() -> bool: method enable_hyperv (line 171) | def enable_hyperv() -> None: class Linux (line 195) | class Linux(Auxiliary): method __init__ (line 200) | def __init__(self, args) -> None: class MacOS (line 208) | class MacOS(Linux): method __init__ (line 213) | def __init__(self, args) -> None: FILE: installer/common/errors.py class BaseError (line 1) | class BaseError(Exception): method __init__ (line 10) | def __init__(self, **kwargs) -> None: method __str__ (line 14) | def __str__(self): method get_exit_code (line 17) | def get_exit_code(self): FILE: installer/common/file_utils.py function _file_reader_iter (line 30) | def _file_reader_iter(path: str, block_size=2 ** 20): function calculate_sha3_384 (line 38) | def calculate_sha3_384(path: str) -> str: function calculate_hash (line 43) | def calculate_hash(path: str, *, algorithm: str) -> str: function is_dumb_terminal (line 53) | def is_dumb_terminal(): function get_kubectl_directory (line 60) | def get_kubectl_directory() -> str: function get_kubeconfig_path (line 80) | def get_kubeconfig_path(): function clear_kubeconfig (line 88) | def clear_kubeconfig(): FILE: installer/tests/integration/test_cli.py class TestClass (line 12) | class TestClass: method test_install_remove_multipass (line 18) | def test_install_remove_multipass(self, tty_mock): method test_all_cli (line 42) | def test_all_cli(self): method test_install_argument_are_validated (line 53) | def test_install_argument_are_validated(self): FILE: installer/tests/unit/test_auxiliary.py function get_mocked_args (line 5) | def get_mocked_args(disk=1, mem=1, cpu=1): function test_has_enough_memory (line 11) | def test_has_enough_memory(virtual_memory_mock): function test_has_enough_cpus (line 25) | def test_has_enough_cpus(cpu_count_mock): function test_has_enough_disk_space (line 37) | def test_has_enough_disk_space(disk_usage_mock): FILE: installer/tests/unit/test_cli.py function test_install_exits_on_cpus_requested_exceed_available_on_host (line 7) | def test_install_exits_on_cpus_requested_exceed_available_on_host(has_en... function test_install_exits_on_memory_requested_exceed_available_on_host (line 16) | def test_install_exits_on_memory_requested_exceed_available_on_host( FILE: installer/vm_providers/_base_provider.py class Provider (line 33) | class Provider(abc.ABC): method __init__ (line 34) | def __init__( method ensure_provider (line 53) | def ensure_provider(cls) -> None: method setup_provider (line 57) | def setup_provider(cls, *, echoer) -> None: method _get_provider_name (line 61) | def _get_provider_name(cls) -> str: method _get_is_snap_injection_capable (line 65) | def _get_is_snap_injection_capable(cls) -> bool: method create (line 69) | def create(self) -> None: method destroy (line 73) | def destroy(self) -> None: method get_instance_info (line 81) | def get_instance_info(self) -> InstanceInfo: method run (line 85) | def run(self, command: Sequence[str], hide_output: bool = False) -> Op... method _launch (line 89) | def _launch(self, specs: Dict): method _start (line 93) | def _start(self): method _push_file (line 97) | def _push_file(self, *, source: str, destination: str) -> None: method pull_file (line 101) | def pull_file(self, name: str, destination: str, delete: bool = False)... method shell (line 115) | def shell(self) -> None: method launch_instance (line 118) | def launch_instance(self, specs: Dict) -> None: method _check_connectivity (line 129) | def _check_connectivity(self) -> None: method _copy_kubeconfig_to_kubectl (line 148) | def _copy_kubeconfig_to_kubectl(self, specs: Dict): method _setup_microk8s (line 158) | def _setup_microk8s(self, specs: Dict) -> None: method _get_env_command (line 165) | def _get_env_command(self) -> Sequence[str]: method _get_home_directory (line 182) | def _get_home_directory(self) -> pathlib.Path: method _base_has_changed (line 203) | def _base_has_changed(self, base: str, provider_base: str) -> bool: method _log_run (line 212) | def _log_run(self, command: Sequence[str]) -> None: method stop (line 217) | def stop(self) -> None: FILE: installer/vm_providers/_multipass/_instance_info.py class InstanceInfo (line 23) | class InstanceInfo: method from_json (line 25) | def from_json( method __init__ (line 67) | def __init__( method is_mounted (line 86) | def is_mounted(self, mountpoint: str) -> bool: method is_stopped (line 89) | def is_stopped(self) -> bool: method is_running (line 92) | def is_running(self) -> bool: FILE: installer/vm_providers/_multipass/_multipass.py class Multipass (line 30) | class Multipass(Provider): method ensure_provider (line 34) | def ensure_provider(cls): method setup_provider (line 38) | def setup_provider(cls, *, echoer) -> None: method _get_is_snap_injection_capable (line 42) | def _get_is_snap_injection_capable(cls) -> bool: method _get_provider_name (line 46) | def _get_provider_name(cls): method run (line 49) | def run(self, command: Sequence[str], hide_output: bool = False) -> Op... method _launch (line 58) | def _launch(self, specs: Dict) -> None: method get_instance_info (line 83) | def get_instance_info(self) -> InstanceInfo: method _start (line 95) | def _start(self): method _umount (line 109) | def _umount(self, *, mountpoint: str) -> None: method _push_file (line 113) | def _push_file(self, *, source: str, destination: str) -> None: method __init__ (line 117) | def __init__( method create (line 132) | def create(self, specs: Dict) -> None: method destroy (line 138) | def destroy(self) -> None: method pull_file (line 151) | def pull_file(self, name: str, destination: str, delete: bool = False)... method shell (line 163) | def shell(self) -> None: method _get_instance_info (line 166) | def _get_instance_info(self) -> InstanceInfo: method start (line 174) | def start(self) -> None: method stop (line 181) | def stop(self) -> None: FILE: installer/vm_providers/_multipass/_multipass_command.py function _run (line 32) | def _run(command: Sequence[str], stdin=subprocess.DEVNULL) -> None: function _run_output (line 37) | def _run_output(command: Sequence[str], **kwargs) -> bytes: class MultipassCommand (line 42) | class MultipassCommand: method ensure_multipass (line 49) | def ensure_multipass(cls, platform: str) -> None: method _wait_for_multipass_ready (line 74) | def _wait_for_multipass_ready(cls, *, echoer): method setup_multipass (line 101) | def setup_multipass(cls, *, echoer, platform: str) -> None: method __init__ (line 125) | def __init__(self, *, platform: str) -> None: method launch (line 133) | def launch( method start (line 172) | def start(self, *, instance_name: str) -> None: method stop (line 185) | def stop(self, *, instance_name: str, time: int = None) -> None: method delete (line 203) | def delete(self, *, instance_name: str, purge=True) -> None: method execute (line 219) | def execute( method shell (line 244) | def shell(self, *, instance_name: str) -> None: method mount (line 256) | def mount( method umount (line 295) | def umount(self, *, mount: str) -> None: method copy_files (line 310) | def copy_files(self, *, source: str, destination: str) -> None: method info (line 326) | def info(self, *, instance_name: str, output_format: str = None) -> by... FILE: installer/vm_providers/_multipass/_windows.py function windows_reload_multipass_path_env (line 50) | def windows_reload_multipass_path_env(): function _run_installer (line 72) | def _run_installer(installer_path: str, echoer): function _requests_exception_hint (line 113) | def _requests_exception_hint(e: requests.RequestException) -> str: function _fetch_installer_url (line 125) | def _fetch_installer_url() -> str: function _download_multipass (line 156) | def _download_multipass(dl_dir: str, echoer) -> str: function windows_install_multipass (line 184) | def windows_install_multipass(echoer) -> None: function _init_progress_bar (line 197) | def _init_progress_bar(total_length, destination, message=None): function download_requests_stream (line 219) | def download_requests_stream(request_stream, destination, message=None, ... FILE: installer/vm_providers/errors.py class ConnectivityError (line 24) | class ConnectivityError(BaseError): class ProviderBaseError (line 28) | class ProviderBaseError(BaseError): class ProviderNotSupportedError (line 32) | class ProviderNotSupportedError(ProviderBaseError): method __init__ (line 39) | def __init__(self, *, provider: str) -> None: class ProviderNotFound (line 43) | class ProviderNotFound(ProviderBaseError): method __init__ (line 47) | def __init__(self, *, provider: str, prompt_installable: bool, error_m... class _GenericProviderError (line 57) | class _GenericProviderError(ProviderBaseError): method __init__ (line 77) | def __init__( class ProviderCommunicationError (line 104) | class ProviderCommunicationError(ProviderBaseError): method __init__ (line 111) | def __init__(self, *, provider_name: str, message: str) -> None: class ProviderLaunchError (line 115) | class ProviderLaunchError(_GenericProviderError): method __init__ (line 116) | def __init__( class ProviderStartError (line 131) | class ProviderStartError(_GenericProviderError): method __init__ (line 132) | def __init__( class ProviderStopError (line 147) | class ProviderStopError(_GenericProviderError): method __init__ (line 148) | def __init__( class ProviderDeleteError (line 163) | class ProviderDeleteError(_GenericProviderError): method __init__ (line 164) | def __init__( class ProviderExecError (line 179) | class ProviderExecError(ProviderBaseError): method __init__ (line 186) | def __init__(self, *, provider_name: str, command: Sequence[str], exit... class ProviderShellError (line 196) | class ProviderShellError(_GenericProviderError): method __init__ (line 197) | def __init__( class ProviderMountError (line 212) | class ProviderMountError(_GenericProviderError): method __init__ (line 213) | def __init__( class ProviderUnMountError (line 228) | class ProviderUnMountError(_GenericProviderError): method __init__ (line 229) | def __init__( class ProviderFileCopyError (line 244) | class ProviderFileCopyError(_GenericProviderError): method __init__ (line 245) | def __init__( class ProviderInfoError (line 260) | class ProviderInfoError(ProviderBaseError): method __init__ (line 267) | def __init__(self, *, provider_name: str, exit_code: int, stderr: byte... class ProviderInstanceNotFoundError (line 271) | class ProviderInstanceNotFoundError(ProviderBaseError): method __init__ (line 275) | def __init__(self, *, instance_name: str) -> None: class ProviderInfoDataKeyError (line 279) | class ProviderInfoDataKeyError(ProviderBaseError): method __init__ (line 286) | def __init__(self, *, provider_name: str, missing_key: str, data: Dict... class ProviderBadDataError (line 290) | class ProviderBadDataError(ProviderBaseError): method __init__ (line 297) | def __init__(self, *, provider_name: str, data: str) -> None: class ProviderMultipassDownloadFailed (line 301) | class ProviderMultipassDownloadFailed(ProviderBaseError): method __init__ (line 308) | def __init__(self, message): class ProviderMultipassInstallationFailed (line 312) | class ProviderMultipassInstallationFailed(ProviderBaseError): method __init__ (line 319) | def __init__(self, message): FILE: installer/vm_providers/factory.py function get_provider_for (line 27) | def get_provider_for(provider_name: str) -> "Type[Provider]": FILE: installer/vm_providers/repo/errors.py class RepoError (line 23) | class RepoError(BaseError): class NoNativeBackendError (line 27) | class NoNativeBackendError(RepoError): class CacheUpdateFailedError (line 32) | class CacheUpdateFailedError(RepoError): method __init__ (line 40) | def __init__(self, errors: str) -> None: class FileProviderNotFound (line 48) | class FileProviderNotFound(RepoError): method __init__ (line 52) | def __init__(self, *, file_path: str) -> None: class BuildPackageNotFoundError (line 56) | class BuildPackageNotFoundError(RepoError): method __init__ (line 60) | def __init__(self, package): class BuildPackagesNotInstalledError (line 64) | class BuildPackagesNotInstalledError(RepoError): method __init__ (line 68) | def __init__(self, *, packages: List[str]) -> None: class PackageFetchError (line 72) | class PackageFetchError(RepoError): method __init__ (line 76) | def __init__(self, message: str) -> None: class PackageBrokenError (line 80) | class PackageBrokenError(RepoError): method __init__ (line 84) | def __init__(self, package: str, deps: List[str]) -> None: class PackageNotFoundError (line 88) | class PackageNotFoundError(RepoError): method message (line 90) | def message(self): method __init__ (line 95) | def __init__(self, package_name): method __str__ (line 98) | def __str__(self): class UnpackError (line 102) | class UnpackError(RepoError): method __init__ (line 106) | def __init__(self, package): class SnapUnavailableError (line 110) | class SnapUnavailableError(RepoError): method __init__ (line 119) | def __init__(self, *, snap_name: str, snap_channel: str) -> None: class SnapFindError (line 123) | class SnapFindError(RepoError): method __init__ (line 130) | def __init__(self, *, snap_name): class SnapInstallError (line 134) | class SnapInstallError(RepoError): method __init__ (line 138) | def __init__(self, *, snap_name, snap_channel): class SnapDownloadError (line 142) | class SnapDownloadError(RepoError): method __init__ (line 146) | def __init__(self, *, snap_name, snap_channel): class SnapGetAssertionError (line 150) | class SnapGetAssertionError(RepoError): method __init__ (line 158) | def __init__(self, *, assertion_params: Sequence[str]) -> None: class SnapRefreshError (line 162) | class SnapRefreshError(RepoError): method __init__ (line 166) | def __init__(self, *, snap_name, snap_channel): class SnapdConnectionError (line 170) | class SnapdConnectionError(RepoError): method __init__ (line 174) | def __init__(self, snap_name: str, url: str) -> None: FILE: installer/vm_providers/repo/snaps.py class SnapPackage (line 40) | class SnapPackage: method is_valid_snap (line 56) | def is_valid_snap(cls, snap): method is_snap_installed (line 60) | def is_snap_installed(cls, snap): method __init__ (line 63) | def __init__(self, snap): method installed (line 79) | def installed(self): method in_store (line 85) | def in_store(self): method get_local_snap_info (line 93) | def get_local_snap_info(self): method get_store_snap_info (line 102) | def get_store_snap_info(self): method _get_store_channels (line 128) | def _get_store_channels(self): method get_current_channel (line 135) | def get_current_channel(self): method has_assertions (line 144) | def has_assertions(self) -> bool: method is_classic (line 149) | def is_classic(self) -> bool: method is_valid (line 163) | def is_valid(self) -> bool: method local_download (line 170) | def local_download(self, *, snap_path: str, assertion_path: str) -> None: method download (line 197) | def download(self, *, directory: str = None): method install (line 209) | def install(self): method refresh (line 231) | def refresh(self): function download_snaps (line 252) | def download_snaps(*, snaps_list: Sequence[str], directory: str) -> None: function install_snaps (line 273) | def install_snaps(snaps_list: Union[Sequence[str], Set[str]]) -> List[str]: function _snap_command_requires_sudo (line 303) | def _snap_command_requires_sudo(): function get_assertion (line 317) | def get_assertion(assertion_params: Sequence[str]) -> bytes: function _get_parsed_snap (line 330) | def _get_parsed_snap(snap): function get_snapd_socket_path_template (line 341) | def get_snapd_socket_path_template(): function _get_local_snap_file_iter (line 345) | def _get_local_snap_file_iter(snap_name, *, chunk_size: int): function _get_local_snap_info (line 356) | def _get_local_snap_info(snap_name): function _get_store_snap_info (line 367) | def _get_store_snap_info(snap_name): function get_installed_snaps (line 377) | def get_installed_snaps(): FILE: scripts/calico/upgrade.py function get_calico_node_spec (line 8) | def get_calico_node_spec(cni_file): function is_calico_cni_manifest (line 35) | def is_calico_cni_manifest(cni_file): function get_installed_version_of_calico (line 52) | def get_installed_version_of_calico(cni_file): function get_calicos_autodetection_method (line 70) | def get_calicos_autodetection_method(cni_file): function patch_manifest (line 88) | def patch_manifest(cni_file, autodetection): function backup_old_cni (line 129) | def backup_old_cni(cni_file): function try_upgrade (line 137) | def try_upgrade(cni_file, new_cni_file, cni_no_manage=None): function mark_apply_needed (line 171) | def mark_apply_needed(lock_file): function main (line 181) | def main(): FILE: scripts/find-resolv-conf.py function safe_is_non_loopback_address (line 18) | def safe_is_non_loopback_address(address: str): function find_resolv_conf_with_non_loopback_address (line 39) | def find_resolv_conf_with_non_loopback_address(resolv_confs: list): function main (line 60) | def main(resolv_confs): FILE: scripts/kill-host-pods.py function post_filter_has_known_containers (line 19) | def post_filter_has_known_containers(pod, containers: list) -> bool: function post_filter_has_snap_data_mounts (line 35) | def post_filter_has_snap_data_mounts(pod) -> bool: function post_filter_has_owner (line 59) | def post_filter_has_owner(pod: dict): function main (line 73) | def main(selector: list, dry_run: bool, with_snap_data_mounts: bool, wit... FILE: scripts/run-lifecycle-hooks.py function main (line 14) | def main(hook: str): FILE: scripts/wrappers/add_token.py function token_hex (line 16) | def token_hex(nbytes=None): function add_token_with_expiry (line 26) | def add_token_with_expiry(token, file, ttl): function run_util (line 46) | def run_util(*args, debug=False): function get_network_info (line 71) | def get_network_info(): function print_pretty (line 83) | def print_pretty(token, check): function get_output_dict (line 102) | def get_output_dict(token, check): function print_json (line 111) | def print_json(token, check): function print_yaml (line 116) | def print_yaml(token, check): function print_short (line 121) | def print_short(token, check): FILE: scripts/wrappers/addons.py class RepoValidationError (line 25) | class RepoValidationError(Exception): method message (line 27) | def message(self) -> str: class AddonsYamlNotFoundError (line 31) | class AddonsYamlNotFoundError(RepoValidationError): method __init__ (line 32) | def __init__(self, repo_name: str): method message (line 36) | def message(self) -> str: class AddonsYamlFormatError (line 40) | class AddonsYamlFormatError(RepoValidationError): method __init__ (line 41) | def __init__(self, message): method message (line 45) | def message(self) -> str: class MissingHookError (line 49) | class MissingHookError(RepoValidationError): method __init__ (line 50) | def __init__(self, hook_name: str, addon: str): method message (line 55) | def message(self) -> str: class WrongHookPermissionsError (line 59) | class WrongHookPermissionsError(RepoValidationError): method __init__ (line 60) | def __init__(self, hook_name: str, addon: str): method message (line 65) | def message(self) -> str: function validate_addons_repo (line 69) | def validate_addons_repo(repo_dir: Path) -> None: function validate_addons_file (line 78) | def validate_addons_file(repo_dir: Path) -> None: function load_addons_yaml (line 128) | def load_addons_yaml(repo_dir: Path): function validate_hooks (line 140) | def validate_hooks(repo_dir: Path) -> None: function get_addons_list (line 155) | def get_addons_list(repo_dir: Path) -> List[str]: function pull_and_validate (line 160) | def pull_and_validate(name: str, repo_dir: Path): function clone_and_validate (line 173) | def clone_and_validate(remote_url: str, repo_dir: Path): function add (line 193) | def add(name: str, repository: str, reference: str, force: bool): function remove (line 221) | def remove(name: str): function update (line 234) | def update(name: str, skip_check_root: bool): class GettingGitCommitError (line 273) | class GettingGitCommitError(Exception): method __init__ (line 274) | def __init__(self, exit_code, stderr): function git_current_commit (line 279) | def git_current_commit(repository: Path) -> str: function git_rollback (line 291) | def git_rollback(commit: str, repository: Path): function list (line 301) | def list(format: str): FILE: scripts/wrappers/common/cluster/utils.py class InvalidConnectionError (line 22) | class InvalidConnectionError(Exception): function is_strict (line 26) | def is_strict(): function get_group (line 33) | def get_group(): function snap (line 37) | def snap() -> Path: function snap_data (line 44) | def snap_data() -> Path: function try_set_file_permissions (line 51) | def try_set_file_permissions(file): function remove_expired_token_from_file (line 72) | def remove_expired_token_from_file(file): function remove_token_from_file (line 92) | def remove_token_from_file(token, file): function is_token_expired (line 115) | def is_token_expired(token_line): function get_callback_token (line 129) | def get_callback_token(): function is_node_running_dqlite (line 149) | def is_node_running_dqlite(): function is_node_dqlite_worker (line 159) | def is_node_dqlite_worker(): function is_low_memory_guard_enabled (line 175) | def is_low_memory_guard_enabled(): function get_dqlite_port (line 185) | def get_dqlite_port(): function get_cluster_agent_port (line 205) | def get_cluster_agent_port(): function get_cluster_cidr (line 225) | def get_cluster_cidr(): function get_control_plane_nodes_internal_ips (line 237) | def get_control_plane_nodes_internal_ips(): function get_internal_ip_from_get_node (line 258) | def get_internal_ip_from_get_node(node_info): function is_same_server (line 267) | def is_same_server(hostname, ip): function apply_cni_manifest (line 282) | def apply_cni_manifest(timeout_insec=60): function cni_is_patched (line 304) | def cni_is_patched(): function cni_yaml_exists (line 317) | def cni_yaml_exists(): function patch_cni (line 326) | def patch_cni(ip): function try_initialise_cni_autodetect_for_clustering (line 344) | def try_initialise_cni_autodetect_for_clustering(ip, apply_cni=True): function is_kubelite (line 360) | def is_kubelite(): function service (line 371) | def service(operation, service_name): function mark_no_cert_reissue (line 386) | def mark_no_cert_reissue(): function unmark_no_cert_reissue (line 397) | def unmark_no_cert_reissue(): function restart_all_services (line 408) | def restart_all_services(): function get_token (line 439) | def get_token(name, tokens_file="known_tokens.csv"): function get_arg (line 457) | def get_arg(key, file): function set_arg (line 476) | def set_arg(key, value, file): function is_token_auth_enabled (line 508) | def is_token_auth_enabled(): function enable_token_auth (line 518) | def enable_token_auth(token): function ca_one_line (line 534) | def ca_one_line(ca): function rebuild_x509_auth_client_configs (line 543) | def rebuild_x509_auth_client_configs(): function get_valid_connection_parts (line 557) | def get_valid_connection_parts(connection): FILE: scripts/wrappers/common/utils.py function get_current_arch (line 25) | def get_current_arch(): function snap (line 39) | def snap() -> Path: function snap_data (line 46) | def snap_data() -> Path: function snap_common (line 53) | def snap_common() -> Path: function run (line 60) | def run(*args, die=True): function is_cluster_ready (line 82) | def is_cluster_ready(with_ready_node=True): function is_ha_enabled (line 91) | def is_ha_enabled(): function get_dqlite_info (line 96) | def get_dqlite_info(): function get_etcd_info (line 141) | def get_etcd_info(): function get_server_urls (line 159) | def get_server_urls(args): function is_external_etcd (line 171) | def is_external_etcd(): function is_cluster_locked (line 181) | def is_cluster_locked(): function wait_for_ready (line 188) | def wait_for_ready(timeout, with_ready_node=True): function exit_if_no_root (line 201) | def exit_if_no_root(): function exit_if_stopped (line 212) | def exit_if_stopped(): function exit_if_no_permission (line 219) | def exit_if_no_permission(): function ensure_started (line 240) | def ensure_started(): function kubectl_get (line 246) | def kubectl_get(cmd, namespace="--all-namespaces"): function kubectl_get_clusterroles (line 253) | def kubectl_get_clusterroles(): function is_community_addon (line 264) | def is_community_addon(arch, addon_name): function get_available_addons (line 287) | def get_available_addons(arch): function get_addon_by_name (line 315) | def get_addon_by_name(addons, name): function is_service_expected_to_start (line 334) | def is_service_expected_to_start(service): function set_service_expected_to_start (line 345) | def set_service_expected_to_start(service, start=True): function check_help_flag (line 360) | def check_help_flag(addons: list) -> bool: function parse_xable_addon_args (line 374) | def parse_xable_addon_args(addon_args: list, available_addons: list): function parse_xable_single_arg (line 417) | def parse_xable_single_arg(addon_arg: str, available_addons: list): function xable (line 466) | def xable(action: str, addon_args: list): function protected_xable (line 473) | def protected_xable(action: str, addon_args: list): function unprotected_xable (line 503) | def unprotected_xable(action: str, addon_args: list): function is_enabled (line 553) | def is_enabled(addon, item): function get_status (line 561) | def get_status(available_addons, isReady): function is_within_directory (line 582) | def is_within_directory(directory, target): function safe_extract (line 591) | def safe_extract(tar, path=".", members=None, *, numeric_owner=False): FILE: scripts/wrappers/dashboard_proxy.py function get_token (line 24) | def get_token(secret): function dashboard_proxy (line 58) | def dashboard_proxy(): FILE: scripts/wrappers/dbctl.py function get_kine_endpoint (line 20) | def get_kine_endpoint(): function kine_exists (line 27) | def kine_exists(): function generate_backup_name (line 37) | def generate_backup_name(): function run_command (line 46) | def run_command(command): function backup (line 63) | def backup(fname=None, debug=False): function restore (line 103) | def restore(fname_tar, debug=False): FILE: scripts/wrappers/disable.py function disable (line 22) | def disable(addons): FILE: scripts/wrappers/distributed_op.py function get_cluster_agent_endpoints (line 34) | def get_cluster_agent_endpoints(include_self=False): function do_configure_op (line 90) | def do_configure_op(remote_op): function do_image_import (line 122) | def do_image_import(image_data): function restart (line 153) | def restart(service): function update_argument (line 167) | def update_argument(service, key, value): function remove_argument (line 183) | def remove_argument(service, key): function set_addon (line 198) | def set_addon(addon, state): function usage (line 218) | def usage(): FILE: scripts/wrappers/enable.py function enable (line 19) | def enable(addons) -> None: FILE: scripts/wrappers/images.py function import_images (line 18) | def import_images(image: str): function get_all_ctr_images (line 33) | def get_all_ctr_images(): function export_images (line 46) | def export_images(output: str, images: List[str]): FILE: scripts/wrappers/join.py function get_traefik_port (line 60) | def get_traefik_port(): function join_request (line 79) | def join_request(conn, api_version, req_data, master_ip, verify_peer, fi... function extract_error (line 118) | def extract_error(response): function get_connection_info (line 131) | def get_connection_info( function get_etcd_client_cert (line 190) | def get_etcd_client_cert(master_ip, master_port, token): function get_client_cert (line 224) | def get_client_cert(master_ip, master_port, fname: str, token: str, subj... function update_flannel (line 269) | def update_flannel(etcd, master_ip, master_port, token): function create_kubeconfig (line 287) | def create_kubeconfig(token, ca, master_ip, api_port, filename, user): function update_kubeproxy (line 316) | def update_kubeproxy(token, ca, master_ip, api_port): function update_cert_auth_kubeproxy (line 331) | def update_cert_auth_kubeproxy(token, master_ip, master_port): function update_kubeproxy_cidr (line 346) | def update_kubeproxy_cidr(cidr): function update_cert_auth_kubelet (line 352) | def update_cert_auth_kubelet(token, master_ip, master_port): function update_kubelet (line 372) | def update_kubelet(token, ca, master_ip, api_port): function update_apiserver (line 391) | def update_apiserver(api_authz_mode, apiserver_port): function store_remote_ca (line 405) | def store_remote_ca(ca): function mark_worker_node (line 416) | def mark_worker_node(): function generate_callback_token (line 431) | def generate_callback_token(): function store_base_kubelet_args (line 445) | def store_base_kubelet_args(args_string): function update_kubelet_node_ip (line 457) | def update_kubelet_node_ip(args_string, hostname_override): function update_kubelet_hostname_override (line 468) | def update_kubelet_hostname_override(args_string): function replace_admin_token (line 478) | def replace_admin_token(token): function store_cert (line 499) | def store_cert(filename, payload): function store_cluster_certs (line 516) | def store_cluster_certs(cluster_cert, cluster_key): function create_admin_kubeconfig (line 531) | def create_admin_kubeconfig(ca, ha_admin_token=None): function store_callback_token (line 565) | def store_callback_token(token): function update_dqlite (line 577) | def update_dqlite(cluster_cert, cluster_key, voters, host): function join_dqlite (line 647) | def join_dqlite(connection_parts, verify=False, worker=False): function update_apiserver_proxy (line 695) | def update_apiserver_proxy(master_ip, api_port): function rebuild_token_based_auth_configs (line 719) | def rebuild_token_based_auth_configs(info): function print_worker_usage (line 733) | def print_worker_usage(): function join_dqlite_worker_node (line 750) | def join_dqlite_worker_node(info, master_ip, master_port, token): function join_dqlite_master_node (line 787) | def join_dqlite_master_node(info, master_ip): function join_etcd (line 850) | def join_etcd(connection_parts, verify=True): function mark_join_in_progress (line 916) | def mark_join_in_progress(): function unmark_join_in_progress (line 925) | def unmark_join_in_progress(): function mark_no_dqlite (line 934) | def mark_no_dqlite(): function join (line 970) | def join(connection, worker, skip_verify, disable_low_memory_guard): FILE: scripts/wrappers/leave.py function reset_current_dqlite_worker_installation (line 33) | def reset_current_dqlite_worker_installation(): function disable_apiserver_proxy (line 60) | def disable_apiserver_proxy(): function unmark_worker_node (line 71) | def unmark_worker_node(): function reset_current_etcd_installation (line 85) | def reset_current_etcd_installation(): function reset_current_dqlite_installation (line 123) | def reset_current_dqlite_installation(): function apply_cni (line 163) | def apply_cni(): function reinit_cluster (line 189) | def reinit_cluster(): function is_leader_without_successor (line 238) | def is_leader_without_successor(): function get_dqlite_endpoints (line 284) | def get_dqlite_endpoints(): function delete_dqlite_node (line 320) | def delete_dqlite_node(delete_node, dqlite_ep): function leave (line 340) | def leave(): FILE: scripts/wrappers/refresh_certs.py function check_certificate (line 28) | def check_certificate(): function undo_refresh (line 47) | def undo_refresh(): function restart (line 65) | def restart(service="all"): function update_configs (line 88) | def update_configs(): function take_backup (line 103) | def take_backup(): function reproduce_all_root_ca_certs (line 116) | def reproduce_all_root_ca_certs(): function reproduce_front_proxy_client_cert (line 137) | def reproduce_front_proxy_client_cert(): function reproduce_server_cert (line 155) | def reproduce_server_cert(): function refresh_cert (line 172) | def refresh_cert(cert): function install_certs (line 195) | def install_certs(ca_dir): function validate_certificates (line 208) | def validate_certificates(ca_dir): function install_ca (line 238) | def install_ca(ca_dir): function refresh_certs (line 290) | def refresh_certs(ca_dir, undo, check, cert, help): function show_help (line 336) | def show_help(): FILE: scripts/wrappers/remove_node.py function remove_dqlite_node (line 26) | def remove_dqlite_node(node, force=False): function remove_node (line 99) | def remove_node(node): function remove_kubelet_token (line 121) | def remove_kubelet_token(node): function get_dqlite_endpoints (line 142) | def get_dqlite_endpoints(): function delete_dqlite_node (line 178) | def delete_dqlite_node(delete_node, dqlite_ep): function remove_callback_token (line 197) | def remove_callback_token(node): function reset (line 232) | def reset(node, force): FILE: scripts/wrappers/reset.py function exit_if_multinode (line 26) | def exit_if_multinode(): function disable_addon (line 44) | def disable_addon(repo, addon, args=None): function disable_addons (line 63) | def disable_addons(destroy_storage): function cni (line 92) | def cni(operation="apply"): function clean_cluster (line 109) | def clean_cluster(): function remove_storage_classes (line 150) | def remove_storage_classes(): function remove_crds (line 167) | def remove_crds(): function remove_non_namespaced_resources (line 179) | def remove_non_namespaced_resources(): function remove_priority_classes (line 194) | def remove_priority_classes(): function reset_cert_reissue (line 211) | def reset_cert_reissue(): function remove_binaries (line 221) | def remove_binaries(): function restart_cluster (line 230) | def restart_cluster(): function remove_extra_resources (line 244) | def remove_extra_resources(ns_name): function run_silently (line 258) | def run_silently(cmd): function preflight_check (line 271) | def preflight_check(): function reset (line 291) | def reset(destroy_storage): FILE: scripts/wrappers/status.py function print_short (line 22) | def print_short(isReady, enabled_addons, disabled_addons): function print_pretty (line 36) | def print_pretty(isReady, enabled_addons, disabled_addons): function print_short_yaml (line 96) | def print_short_yaml(isReady, enabled_addons, disabled_addons): function print_yaml (line 117) | def print_yaml(isReady, enabled_addons, disabled_addons): function print_addon_status (line 156) | def print_addon_status(enabled): function ha_cluster_formed (line 163) | def ha_cluster_formed(info): FILE: scripts/wrappers/upgrade.py function upgrade_master (line 16) | def upgrade_master(upgrade, phase): function node_upgrade (line 34) | def node_upgrade(upgrade, phase, node_ep, token): function rollback (line 59) | def rollback(upgrade): function run_upgrade (line 88) | def run_upgrade(upgrade): function get_nodes_info (line 124) | def get_nodes_info(safe=True): function list_upgrades (line 159) | def list_upgrades(): FILE: scripts/wrappers/version.py function get_snap_version (line 6) | def get_snap_version() -> str: function get_snap_revision (line 10) | def get_snap_revision() -> str: function print_versions (line 14) | def print_versions() -> None: FILE: tests/test-cluster-agent.py class TestClusterAgent (line 4) | class TestClusterAgent(object): method test_cluster_agent_health (line 9) | def test_cluster_agent_health(self): FILE: tests/test-cluster.py class VM (line 33) | class VM: method __init__ (line 50) | def __init__(self, backend=None, attach_vm=None): method setup (line 65) | def setup(self, channel_or_snap): method _setup_lxc (line 83) | def _setup_lxc(self, channel_or_snap): method _load_launch_configuration_lxc (line 134) | def _load_launch_configuration_lxc(self): method _transfer_install_local_snap_lxc (line 150) | def _transfer_install_local_snap_lxc(self, channel_or_snap): method _setup_multipass (line 167) | def _setup_multipass(self, channel_or_snap): method _load_launch_configuration_multipass (line 198) | def _load_launch_configuration_multipass(self): method _transfer_install_local_snap_multipass (line 216) | def _transfer_install_local_snap_multipass(self, channel_or_snap): method run (line 228) | def run(self, cmd): method transfer_file (line 256) | def transfer_file(self, file_path, remote_path): method release (line 274) | def release(self): class TestCluster (line 287) | class TestCluster(object): method setup_cluster (line 289) | def setup_cluster(self): method test_calico_in_nodes (line 363) | def test_calico_in_nodes(self): method test_calico_interfaces_removed_on_snap_remove (line 378) | def test_calico_interfaces_removed_on_snap_remove(self): method test_nodes_in_ha (line 404) | def test_nodes_in_ha(self): method test_worker_node (line 519) | def test_worker_node(self): method test_no_cert_reissue_in_nodes (line 599) | def test_no_cert_reissue_in_nodes(self): method test_dual_stack_cluster (line 614) | def test_dual_stack_cluster(self): class TestUpgradeCluster (line 658) | class TestUpgradeCluster(object): method setup_old_versioned_cluster (line 660) | def setup_old_versioned_cluster(self): method test_mixed_version_join (line 756) | def test_mixed_version_join(self): FILE: tests/test-simple.py class TestSimple (line 9) | class TestSimple(object): method test_microk8s_nodes_ready (line 10) | def test_microk8s_nodes_ready(self): method test_calico_cni_pods_running (line 26) | def test_calico_cni_pods_running(self): method test_nginx_ingress (line 44) | def test_nginx_ingress(self): method test_microk8s_services_running (line 95) | def test_microk8s_services_running(self): method test_microk8s_stop_start (line 138) | def test_microk8s_stop_start(self): FILE: tests/test-upgrade-path.py class TestUpgradePath (line 16) | class TestUpgradePath(object): method test_refresh_path (line 25) | def test_refresh_path(self): FILE: tests/test-upgrade.py class TestUpgrade (line 32) | class TestUpgrade(object): method test_upgrade (line 37) | def test_upgrade(self): FILE: tests/unit/cluster/test_join.py function test_command_help_arguments (line 10) | def test_command_help_arguments(): function test_command_errors_if_no_arguments (line 18) | def test_command_errors_if_no_arguments(): function test_join_dqlite_master_node (line 30) | def test_join_dqlite_master_node( FILE: tests/unit/cluster/test_leave.py function test_command_help_arguments (line 5) | def test_command_help_arguments(): FILE: tests/unit/test_addons.py function test_get_available_addons (line 77) | def test_get_available_addons(snap_common_mock, listdir_mock, strict_moc... function test_parse_addons_args (line 123) | def test_parse_addons_args(args, result): function test_validate_addons_file (line 148) | def test_validate_addons_file(load_addons_mock): function test_validate_addons_file_raises_if_invalid_format (line 153) | def test_validate_addons_file_raises_if_invalid_format(load_addons_mock): function test_load_addons_raises_on_file_not_found (line 159) | def test_load_addons_raises_on_file_not_found(): function test_load_addons_raises_on_invalid_yaml_contents (line 166) | def test_load_addons_raises_on_invalid_yaml_contents(repo_dir): function test_get_addons_list (line 176) | def test_get_addons_list(): function test_validate_addons_repo (line 181) | def test_validate_addons_repo(repo_dir): function test_validate_addons_repo_raises_on_missing_enable_hook (line 185) | def test_validate_addons_repo_raises_on_missing_enable_hook(addon_missin... function test_validate_addons_repo_raises_on_missing_disable_hook (line 191) | def test_validate_addons_repo_raises_on_missing_disable_hook(addon_missi... function test_validate_addons_repo_raises_on_enable_not_executable (line 197) | def test_validate_addons_repo_raises_on_enable_not_executable(enable_not... function test_validate_addons_repo_raises_on_disable_not_executable (line 203) | def test_validate_addons_repo_raises_on_disable_not_executable(disable_n... function test_add_removes_repo_on_validation_error (line 214) | def test_add_removes_repo_on_validation_error( function repo_dir (line 230) | def repo_dir(tmp_path): function invalid_addons_yaml (line 255) | def invalid_addons_yaml(tmp_path): function missing_addons_yaml (line 264) | def missing_addons_yaml(tmp_path): function addon_missing_enable_hook (line 271) | def addon_missing_enable_hook(repo_dir): function addon_missing_disable_hook (line 278) | def addon_missing_disable_hook(repo_dir): function enable_not_executable (line 285) | def enable_not_executable(repo_dir): function disable_not_executable (line 292) | def disable_not_executable(repo_dir): function create_test_repo (line 299) | def create_test_repo(repo_name: str): function test_update_rollbacks_repo_on_validation_error (line 321) | def test_update_rollbacks_repo_on_validation_error( FILE: tests/unit/test_addtoken.py function test_single (line 5) | def test_single(capsys): function test_multiple (line 15) | def test_multiple(capsys): FILE: tests/unit/test_dashboard_proxy.py function test_command_help_arguments (line 5) | def test_command_help_arguments(): FILE: tests/unit/test_disable.py function test_command_help_arguments (line 6) | def test_command_help_arguments(): function test_command_errors_if_no_arguments (line 14) | def test_command_errors_if_no_arguments(): function test_command_shows_addon_help_message (line 22) | def test_command_shows_addon_help_message(xable_mock): FILE: tests/unit/test_enable.py function test_command_help_arguments (line 6) | def test_command_help_arguments(): function test_command_errors_if_no_arguments (line 14) | def test_command_errors_if_no_arguments(): function test_command_shows_addon_help_message (line 22) | def test_command_shows_addon_help_message(xable_mock): FILE: tests/unit/test_refresh_certs.py class TestRefreshCerts (line 15) | class TestRefreshCerts(object): method test_restart (line 17) | def test_restart(self, mock_check_call): method test_reproduce_all_root_ca_certs (line 25) | def test_reproduce_all_root_ca_certs(self, mock_check_call, mock_subpr... method test_reproduce_front_proxy_client_cert (line 50) | def test_reproduce_front_proxy_client_cert(self, mock_check_call, mock... method test_reproduce_server_cert (line 68) | def test_reproduce_server_cert(self, mock_check_call, mock_restart): method is_argument_in_call (line 86) | def is_argument_in_call(self, mock_function, argument_substring): method test_refresh_cert_errors (line 109) | def test_refresh_cert_errors( function test_command_help_arguments (line 133) | def test_command_help_arguments(): FILE: tests/unit/test_reset.py function test_command_help_arguments (line 5) | def test_command_help_arguments(): FILE: tests/unit/test_upgrade_calico_cni.py class TestCNIUpgrade (line 12) | class TestCNIUpgrade(object): method setup_class (line 13) | def setup_class(self): method test_no_op (line 23) | def test_no_op(self): method test_get_version (line 38) | def test_get_version(self): method test_get_autodetect_method (line 45) | def test_get_autodetect_method(self): method test_patch (line 52) | def test_patch(self): method test_mark (line 70) | def test_mark(self): FILE: tests/unit/test_version.py function test_get_snap_version (line 5) | def test_get_snap_version(): function test_get_snap_revision (line 10) | def test_get_snap_revision(): FILE: tests/utils.py function get_arch (line 13) | def get_arch(): function run_until_success (line 20) | def run_until_success(cmd, timeout_insec=60, err_out=None): function kubectl (line 47) | def kubectl(cmd, timeout_insec=300, err_out=None): function docker (line 62) | def docker(cmd): function kubectl_get (line 78) | def kubectl_get(target, timeout_insec=300): function wait_for_pod_state (line 93) | def wait_for_pod_state( function wait_for_installation (line 132) | def wait_for_installation(cluster_nodes=1, timeout_insec=360): function wait_for_namespace_termination (line 157) | def wait_for_namespace_termination(namespace, timeout_insec=360): function microk8s_enable (line 177) | def microk8s_enable(addon, timeout_insec=300): function microk8s_disable (line 197) | def microk8s_disable(addon): function microk8s_clustering_capable (line 209) | def microk8s_clustering_capable(): function microk8s_reset (line 216) | def microk8s_reset(cluster_nodes=1): function update_yaml_with_arch (line 225) | def update_yaml_with_arch(manifest_file): function is_container (line 239) | def is_container(): function is_strict (line 265) | def is_strict(): function is_ipv6_configured (line 271) | def is_ipv6_configured(): function _get_process (line 279) | def _get_process(name): FILE: tests/validators.py function validate_dns_dashboard (line 21) | def validate_dns_dashboard(): function validate_storage (line 56) | def validate_storage(): function common_ingress (line 95) | def common_ingress(): function validate_ingress (line 124) | def validate_ingress(): function validate_registry (line 145) | def validate_registry(): function validate_forward (line 167) | def validate_forward(): function validate_metrics_server (line 191) | def validate_metrics_server(): function validate_metallb_config (line 210) | def validate_metallb_config(ip_ranges="192.168.0.105"): function validate_dual_stack (line 224) | def validate_dual_stack(): FILE: tests/verify-branches.py class TestMicrok8sBranches (line 5) | class TestMicrok8sBranches(object): method test_branches (line 6) | def test_branches(self): method _upstream_release (line 40) | def _upstream_release(self): method _get_max_minor (line 49) | def _get_max_minor(self, major): method _upstream_release_exists (line 58) | def _upstream_release_exists(self, major, minor):