Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add port conn params#127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
demonolock wants to merge11 commits intomaster
base:master
Choose a base branch
Loading
fromadd-port-conn-params
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
Add port to connection parameters
  • Loading branch information
vshepard committedJun 6, 2024
commite8f4da9f63ac2681d7a10996a3eea625378aea6c
3 changes: 2 additions & 1 deletiontestgres/operations/os_ops.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,8 +10,9 @@


class ConnectionParams:
def __init__(self, host='127.0.0.1', ssh_key=None, username=None):
def __init__(self, host='127.0.0.1',port=None,ssh_key=None, username=None):
self.host = host
self.port = port
self.ssh_key = ssh_key
self.username = username

Expand Down
3 changes: 3 additions & 0 deletionstestgres/operations/remote_ops.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,10 +47,13 @@ def __init__(self, conn_params: ConnectionParams):
self.conn_params = conn_params
self.host = conn_params.host
self.ssh_key = conn_params.ssh_key
self.port = conn_params.port
if self.ssh_key:
self.ssh_cmd = ["-i", self.ssh_key]
else:
self.ssh_cmd = []
if self.port:
self.ssh_cmd = ["-p", self.port]
self.remote = True
self.username = conn_params.username or self.get_user()
self.add_known_host(self.host)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp