From: John Mulligan Date: Sat, 23 Sep 2023 19:22:40 +0000 (-0400) Subject: cephadm: move DeploymentType to deploy.py X-Git-Tag: v19.0.0~330^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e58e0a1705ce07f78627d9082dfd4d1ab591408;p=ceph-ci.git cephadm: move DeploymentType to deploy.py The DeploymentType is used by a number of other classes and functions and has no dependencies beyond enum and is safe to move. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index b6692b399ee..2b7c8a0a69a 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -18,7 +18,6 @@ import tempfile import time import errno import ssl -from enum import Enum from typing import Dict, List, Tuple, Optional, Union, Any, Callable, IO, Sequence, TypeVar, cast, Iterable, TextIO import re @@ -168,6 +167,7 @@ from cephadmlib.daemon_form import ( create as daemon_form_create, register as register_daemon_form, ) +from cephadmlib.deploy import DeploymentType from cephadmlib.sysctl import install_sysctl, migrate_sysctl_dir from cephadmlib.firewalld import Firewalld, update_firewalld @@ -202,17 +202,6 @@ class ContainerInfo: and self.start == other.start and self.version == other.version) - -class DeploymentType(Enum): - # Fresh deployment of a daemon. - DEFAULT = 'Deploy' - # Redeploying a daemon. Works the same as fresh - # deployment minus port checking. - REDEPLOY = 'Redeploy' - # Reconfiguring a daemon. Rewrites config - # files and potentially restarts daemon. - RECONFIG = 'Reconfig' - ################################## diff --git a/src/cephadm/cephadmlib/deploy.py b/src/cephadm/cephadmlib/deploy.py new file mode 100644 index 00000000000..99184377f31 --- /dev/null +++ b/src/cephadm/cephadmlib/deploy.py @@ -0,0 +1,14 @@ +# deploy.py - fundamental deployment types + +from enum import Enum + + +class DeploymentType(Enum): + # Fresh deployment of a daemon. + DEFAULT = 'Deploy' + # Redeploying a daemon. Works the same as fresh + # deployment minus port checking. + REDEPLOY = 'Redeploy' + # Reconfiguring a daemon. Rewrites config + # files and potentially restarts daemon. + RECONFIG = 'Reconfig'