The next commit will introduce module specific CLICommand classes.
Signed-off-by: Samuel Just <sjust@redhat.com>
A simple cluster health alerting module.
"""
-from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule, Option
+from mgr_module import HandleCommandResult, MgrModule, Option
from email.utils import formatdate, make_msgid
from threading import Event
from typing import Any, Optional, Dict, List, TYPE_CHECKING, Union
import math
import random
import time
-from mgr_module import CLIReadCommand, CLICommand, CommandResult, MgrModule, Option, OSDMap, CephReleases
+from mgr_module import CommandResult, MgrModule, Option, OSDMap, CephReleases
from threading import Event
from typing import cast, Any, Dict, List, Optional, Sequence, Tuple, Union
from mgr_module import CRUSHMap
import hashlib
-from mgr_module import CLICommand, CLIReadCommand, CLIWriteCommand, MgrModule, Option
+from mgr_module import MgrModule, Option
import datetime
import errno
import functools
import errno
import json
-from mgr_module import MgrModule, CommandResult, MgrModuleRecoverDB, CLIRequiresDB, CLICommand, CLIReadCommand, Option, MgrDBNotReady
+from mgr_module import MgrModule, CommandResult, MgrModuleRecoverDB, CLIRequiresDB, Option, MgrDBNotReady
import operator
import rados
import re
from requests.exceptions import RequestException
-from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule
+from mgr_module import HandleCommandResult, MgrModule
import errno
from .service import CephTrackerClient
See doc/mgr/hello.rst for more info.
"""
-from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule, Option
+from mgr_module import HandleCommandResult, MgrModule, Option
from threading import Event
from typing import cast, Any, Optional, TYPE_CHECKING
import errno
import time
from typing import cast, Any, Dict, Iterator, List, Optional, Tuple, Union
-from mgr_module import CLICommand, CLIReadCommand, CLIWriteCommand, MgrModule, Option, OptionValue
+from mgr_module import MgrModule, Option, OptionValue
try:
from influxdb import InfluxDBClient
import re
import threading
-from mgr_module import CLICommand, CLIReadCommand, HandleCommandResult
+from mgr_module import HandleCommandResult
from mgr_module import MgrModule, CommandResult, NotifyType
from . import health as health_util
from typing import Any
-from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule
+from mgr_module import HandleCommandResult, MgrModule
class Module(MgrModule):
from typing import List, Optional
-from mgr_module import MgrModule, CLIReadCommand, CLIWriteCommand, Option, NotifyType
+from mgr_module import MgrModule, Option, NotifyType
from .fs.snapshot_mirror import FSSnapshotMirror
from typing import Tuple, Optional, List, Dict, Any
import yaml
-from mgr_module import MgrModule, CLICommand, Option, CLICheckNonemptyFileInput
+from mgr_module import MgrModule, Option, CLICheckNonemptyFileInput
import object_format
import orchestrator
from orchestrator.module import IngressType
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING, Union
import uuid
from prettytable import PrettyTable
-from mgr_module import HealthChecksT, CLIReadCommand, CLIWriteCommand, CRUSHMap, MgrModule, Option, OSDMap
+from mgr_module import HealthChecksT, CRUSHMap, MgrModule, Option, OSDMap
"""
Some terminology is made up for the purposes of this module:
from collections import OrderedDict
from tempfile import NamedTemporaryFile
-from mgr_module import CLIReadCommand, MgrModule, MgrStandbyModule, PG_STATES, Option, ServiceInfoT, HandleCommandResult, CLIWriteCommand
+from mgr_module import MgrModule, MgrStandbyModule, PG_STATES, Option, ServiceInfoT, HandleCommandResult
from mgr_util import get_default_addr, profile_method, build_url, test_port_allocation, PortAlreadyInUse
from orchestrator import OrchestratorClientMixin, raise_if_exception, OrchestratorError
from rbd import RBD
import traceback
from typing import cast, Any, Callable, Optional, Tuple, TypeVar
-from mgr_module import CLIReadCommand, CLIWriteCommand, MgrModule, Option
+from mgr_module import MgrModule, Option
from threading import Thread, Event
from .common import NotAuthorizedError
from mgr_module import (
MgrModule,
- CLICommand,
HandleCommandResult,
Option,
MonCommandFailed,
-from mgr_module import MgrModule, CommandResult, HandleCommandResult, CLICommand, Option
+from mgr_module import MgrModule, CommandResult, HandleCommandResult, Option
import enum
import json
import random
import sqlite3
from typing import Any, Dict, Optional, Tuple, Union
from .fs.schedule_client import SnapSchedClient
-from mgr_module import MgrModule, CLIReadCommand, CLIWriteCommand, Option, NotifyType
+from mgr_module import MgrModule, Option, NotifyType
from mgr_util import CephfsConnectionException
from threading import Event
import mgr_util
import json
-from mgr_module import CLIReadCommand, MgrModule, HandleCommandResult
+from mgr_module import MgrModule, HandleCommandResult
class Module(MgrModule):
from telegraf.basesocket import BaseSocket
from telegraf.protocol import Line
-from mgr_module import CLICommand, CLIReadCommand, MgrModule, Option, OptionValue, PG_STATES
+from mgr_module import MgrModule, Option, OptionValue, PG_STATES
from typing import cast, Any, Dict, Iterable, Optional, Tuple
from urllib.parse import urlparse
from collections import defaultdict
from typing import cast, Any, DefaultDict, Dict, List, Optional, Tuple, TypeVar, TYPE_CHECKING, Union
-from mgr_module import CLICommand, CLIReadCommand, MgrModule, Option, OptionValue, ServiceInfoT
+from mgr_module import MgrModule, Option, OptionValue, ServiceInfoT
ALL_CHANNELS = ['basic', 'ident', 'crash', 'device', 'perf']
from ceph.deployment import inventory
from ceph.deployment.drive_group import DriveGroupSpec
-from mgr_module import CLICommand, HandleCommandResult
+from mgr_module import HandleCommandResult
from mgr_module import MgrModule
import orchestrator