introduce EasyRSA._
This commit is contained in:
parent
f2948a7b64
commit
d89409f973
1 changed files with 15 additions and 0 deletions
|
@ -4,6 +4,7 @@ Python interface to EasyRSA CA.
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import functools
|
||||||
import subprocess
|
import subprocess
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -139,6 +140,20 @@ class EasyRSA:
|
||||||
None: {},
|
None: {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@functools.lru_cache
|
||||||
|
def _load(cls) -> EasyRSA:
|
||||||
|
return cls()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
@property
|
||||||
|
def _(cls) -> EasyRSA:
|
||||||
|
"""
|
||||||
|
Get the singleton
|
||||||
|
"""
|
||||||
|
|
||||||
|
return cls._load()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def output_directory(self) -> Path:
|
def output_directory(self) -> Path:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue