]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr: mechanically fix simple users to not import CLI*Command
authorSamuel Just <sjust@redhat.com>
Mon, 24 Nov 2025 17:29:55 +0000 (09:29 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 17 Dec 2025 17:41:14 +0000 (17:41 +0000)
The next commit will introduce module specific CLICommand classes.

Signed-off-by: Samuel Just <sjust@redhat.com>
21 files changed:
src/pybind/mgr/alerts/module.py
src/pybind/mgr/balancer/module.py
src/pybind/mgr/crash/module.py
src/pybind/mgr/devicehealth/module.py
src/pybind/mgr/feedback/module.py
src/pybind/mgr/hello/module.py
src/pybind/mgr/influx/module.py
src/pybind/mgr/insights/module.py
src/pybind/mgr/iostat/module.py
src/pybind/mgr/mirroring/module.py
src/pybind/mgr/nfs/module.py
src/pybind/mgr/pg_autoscaler/module.py
src/pybind/mgr/prometheus/module.py
src/pybind/mgr/rbd_support/module.py
src/pybind/mgr/rgw/module.py
src/pybind/mgr/selftest/module.py
src/pybind/mgr/snap_schedule/module.py
src/pybind/mgr/status/module.py
src/pybind/mgr/telegraf/module.py
src/pybind/mgr/telemetry/module.py
src/pybind/mgr/test_orchestrator/module.py

index 2374434aea7d186e8cd0bb3222d7a16d5518e5bf..5bd627471ea507c4f9145f85b472d73bd7b6d207 100644 (file)
@@ -3,7 +3,7 @@
 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
index 1c6fa9415b1bf378c4d79c3658cd26c50937793f..78dfa011ef26c7c4a0a13e86edea0c87802ae5e8 100644 (file)
@@ -9,7 +9,7 @@ import json
 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
index e9f78c8151408f8cd38768e54a405194b88855fd..ed1cb63cdb46c6163d2a067d214c51e67fe34ab2 100644 (file)
@@ -1,5 +1,5 @@
 import hashlib
-from mgr_module import CLICommand, CLIReadCommand, CLIWriteCommand, MgrModule, Option
+from mgr_module import MgrModule, Option
 import datetime
 import errno
 import functools
index e90db88fd1695e10a1763c2c74c2b9f584ce23af..0a72e720d09607092585013104e81b7b5e3d4843 100644 (file)
@@ -4,7 +4,7 @@ Device health monitoring
 
 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
index 95683912c090b3667e646c837a9a3468fff41505..59bd7a756740e98c1083b430bfaacb2dd2919446 100644 (file)
@@ -7,7 +7,7 @@ See doc/mgr/feedback.rst for more info.
 
 from requests.exceptions import RequestException
 
-from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule
+from mgr_module import HandleCommandResult, MgrModule
 import errno
 
 from .service import CephTrackerClient
index d4b50f401fcd357e2b70f767dc8819e942c7ce2f..e7a7fc710b6c40f2fa5f712b0876a727c3d881e4 100644 (file)
@@ -5,7 +5,7 @@ A hello world module
 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
index 2d8c5c174b0158828b3417696eb348a38af499db..9735b71c65880da0facb3da0a4bc65174352246d 100644 (file)
@@ -8,7 +8,7 @@ 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
index 4f1ad4ad6ca011d60066112c01f422a5f7388e09..1e82f3dc0ad8151c7c05997e24e49f0b71256ee5 100644 (file)
@@ -3,7 +3,7 @@ import json
 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
 
index b101094abc0c65f87e100b341fc3e7207288a18f..4ef8dbbb0446f69f928c6c19afd7d7f73c9cbbff 100644 (file)
@@ -1,6 +1,6 @@
 from typing import Any
 
-from mgr_module import CLIReadCommand, HandleCommandResult, MgrModule
+from mgr_module import HandleCommandResult, MgrModule
 
 
 class Module(MgrModule):
index 2ea3e1b067c445abb006612cbbd8305460138ab1..01dfe301253768cfc1e0a3c17f8fb83862d877a7 100644 (file)
@@ -1,6 +1,6 @@
 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
 
index ff67eba64f96c0cb7bd862faf3dc1439e192a61a..0b18988c1817d2c44d08419243484fa6c2c286fa 100644 (file)
@@ -3,7 +3,7 @@ import threading
 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
index e2daa2ed5f76044f2ab49625b858385b34f37831..ad5ebc14d4ebb8a114c3365d0f7f0b89d50a1029 100644 (file)
@@ -8,7 +8,7 @@ import threading
 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:
index 836f64aa2b76238d55ef435105edbe9faaeee3c0..4e363bf10a903f73b15c9d574029beafd804e5cd 100644 (file)
@@ -11,7 +11,7 @@ from collections import namedtuple
 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
index 369face038ad2a4d0899821adf1118432d88bd01..6934905d8134ffc16675938101e03d148a4e1e2a 100644 (file)
@@ -11,7 +11,7 @@ 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
index fd5f0f7ff48b24bf69bfb70f51e6e14e2da882c9..d77eed2362c19ec004a4ddeabadea46b62fda2f1 100644 (file)
@@ -8,7 +8,6 @@ import sys
 
 from mgr_module import (
     MgrModule,
-    CLICommand,
     HandleCommandResult,
     Option,
     MonCommandFailed,
index 2115c1da35e99abb1cf2a2e8a51a8add44914a22..a4e8f65476f31162f9b06df59d6e9a22a90cca41 100644 (file)
@@ -1,5 +1,5 @@
 
-from mgr_module import MgrModule, CommandResult, HandleCommandResult, CLICommand, Option
+from mgr_module import MgrModule, CommandResult, HandleCommandResult, Option
 import enum
 import json
 import random
index adf982448b1cf0c2200458706d98d701a5712b8b..7749af7b79b9bf095d42991b7b6fd8d33408d8ff 100644 (file)
@@ -8,7 +8,7 @@ import json
 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
 
index d0026fd1ae299175aacc4343f9266ea1b38db321..02cc5db4b0c5d0801e2bb5a786a7e5736d37e2f0 100644 (file)
@@ -11,7 +11,7 @@ import fnmatch
 import mgr_util
 import json
 
-from mgr_module import CLIReadCommand, MgrModule, HandleCommandResult
+from mgr_module import MgrModule, HandleCommandResult
 
 
 class Module(MgrModule):
index 541ddba4f0737ed544156e7b8787f146ce2f0230..6467f8f8118129c97d9ae53db30b2c6263b39492 100644 (file)
@@ -7,7 +7,7 @@ from threading import Event
 
 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
index 2885450fb857df949954b4dedcf40cb2b5e032b5..148681ca0222dbb4ba884549b2ffe4c66f585d14 100644 (file)
@@ -20,7 +20,7 @@ from threading import Event, Lock
 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']
index 7e63eda86f7e73424416c06e79ba29eb6f173dcf..701a6b9f90cfad190d769e00962b96548095d80a 100644 (file)
@@ -16,7 +16,7 @@ except ImportError:
 
 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