Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo committed Dec 31, 2024
1 parent 0420b93 commit 6613e43
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# See the file LICENSE.IX for complete terms and conditions

from pathlib import Path
from typing import Literal

from middlewared.service import Service
from middlewared.plugins.pool_.utils import ZPOOL_CACHE_FILE
Expand All @@ -17,7 +18,10 @@ class Config:
private = True
namespace = 'failover.zpool.cachefile'

def setup(self, event: str = "MASTER"):
def setup(
self,
event: Literal["MASTER", "BACKUP", "SYNC"] = "MASTER"
):
saved = Path(ZPOOL_CACHE_FILE_SAVED)
default = Path(ZPOOL_CACHE_FILE)
overwrite = Path(ZPOOL_CACHE_FILE_OVERWRITE)
Expand Down

0 comments on commit 6613e43

Please sign in to comment.