Agent: rename CredentialTypes enum to CredentialType

This commit is contained in:
vakarisz 2022-02-15 12:42:36 +02:00
parent 02cdebb88b
commit 9037dfdf99
5 changed files with 9 additions and 9 deletions

View File

@ -1,10 +1,10 @@
from abc import ABC from abc import ABC
from dataclasses import dataclass from dataclasses import dataclass
from ..credential_types import CredentialTypes from ..credential_type import CredentialType
@dataclass @dataclass
class ICredentialComponent(ABC): class ICredentialComponent(ABC):
type: CredentialTypes type: CredentialType
content: dict content: dict

View File

@ -1,7 +1,7 @@
from ..credential_types import CredentialTypes from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent from .i_credential_component import ICredentialComponent
class Password(ICredentialComponent): class Password(ICredentialComponent):
def __init__(self, password: str): def __init__(self, password: str):
super().__init__(type=CredentialTypes.PASSWORD, content={"password": password}) super().__init__(type=CredentialType.PASSWORD, content={"password": password})

View File

@ -1,7 +1,7 @@
from ..credential_types import CredentialTypes from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent from .i_credential_component import ICredentialComponent
class SSHKeypair(ICredentialComponent): class SSHKeypair(ICredentialComponent):
def __init__(self, content: dict): def __init__(self, content: dict):
super().__init__(type=CredentialTypes.SSH_KEYPAIR, content=content) super().__init__(type=CredentialType.SSH_KEYPAIR, content=content)

View File

@ -1,7 +1,7 @@
from ..credential_types import CredentialTypes from ..credential_type import CredentialType
from .i_credential_component import ICredentialComponent from .i_credential_component import ICredentialComponent
class Username(ICredentialComponent): class Username(ICredentialComponent):
def __init__(self, username: str): def __init__(self, username: str):
super().__init__(type=CredentialTypes.USERNAME, content={"username": username}) super().__init__(type=CredentialType.USERNAME, content={"username": username})

View File

@ -1,7 +1,7 @@
from enum import Enum from enum import Enum
class CredentialTypes(Enum): class CredentialType(Enum):
SSH_KEYPAIR = 1 SSH_KEYPAIR = 1
USERNAME = 2 USERNAME = 2
PASSWORD = 3 PASSWORD = 3