File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ def create_with_ssh_key(
52
52
proxy_node_hostname ,
53
53
ssh_key = None ,
54
54
ssh_key_file = None ,
55
+ ssh_passphrase = None ,
55
56
tags = [],
56
57
):
57
58
"""Create a Gateway using SSH key authentication.
@@ -70,6 +71,8 @@ def create_with_ssh_key(
70
71
ssh_key_file: string
71
72
The file path to the ssh key. Alternatively, use the
72
73
ssh_key parameter.
74
+ ssh_passphrase: string
75
+ The passphrase
73
76
tags: string
74
77
Tags to add to the gateway, for example:
75
78
"{ 'tag1': 'foo', 'tag2', 'bar' }".
@@ -96,6 +99,7 @@ def create_with_ssh_key(
96
99
ip = ip ,
97
100
proxy_node_hostname = proxy_node_hostname ,
98
101
ssh_key_data = ssh_key ,
102
+ ssh_passphrase = ssh_passphrase ,
99
103
tags = tags ,
100
104
)
101
105
print (gateway_id )
Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ def create_with_ssh_key(
220
220
this name.
221
221
ssh_key_data: str
222
222
The ssh key data as a string.
223
+ ssh_passphrase: str
224
+ The ssh passphrase
223
225
tags: list
224
226
Tags to use, e.g. "{ 'tag1': 'foo', 'tag2', 'bar' }".
225
227
@@ -250,6 +252,9 @@ def create_with_ssh_key(
250
252
"purpose" : "proxy" ,
251
253
}
252
254
255
+ if ssh_passphrase is not None :
256
+ data ['credentials' ]['ssh_passphrase' ] = ssh_passphrase
257
+
253
258
response = self .client ._request (
254
259
url = "/api/v1/workers/" ,
255
260
http_method = "post" ,
You can’t perform that action at this time.
0 commit comments