Skip to content

feat: store distribution credentials in database - #442

Open
X1pster wants to merge 1 commit into
mainfrom
distro_connection_database
Open

X1pster wants to merge 1 commit into
mainfrom
distro_connection_database

Conversation

@X1pster

@X1pster X1pster commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +23 to +38
DEFAULT_CONNECTIONS: list[dict[str, str | int | bool]] = [
{
"name": "yocto",
"host": "10.5.0.10",
"user": "root",
"password": "",
"port": 2222,
},
{
"name": "opensuse",
"host": "10.5.0.13",
"user": "suser",
"password": "password",
"port": 1616,
},
]

@Artanias Artanias Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо бы также из переменных окружения доставать host, user, password, port (с помощью env_var_to_type) и определять данный список только при наличии их (переменных окружения).

Comment thread src/imgtests/exec/exec.py
@@ -282,16 +269,16 @@ def download(self, remotepath: Path, localpath: Path) -> ExecResult:


def wait_remote(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ещё бы подтянуть изменения из main, там теперь возможно задавать путь до приватного ключа.

name: Mapped[str] = mapped_column(String(100), unique=True)
host: Mapped[str] = mapped_column(String(100))
user: Mapped[str] = mapped_column(String(100))
password: Mapped[str] = mapped_column(String(100))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ещё бы добавить путь до приватного ключа, чтобы была возможность безболезненно на них перейти и не хранить пароли в БД.

port: Mapped[int] = mapped_column(Integer)
is_active: Mapped[bool] = mapped_column(Boolean, server_default="true")

def __repr__(self) -> str:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Обычно пишется так, чтобы по этой строке можно было точно воссоздать объект в коде, т.е. не хватает остальных полей.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants