File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ def create_with_ssh_key(
73
73
ssh_key_file : str, optional
74
74
The SSH key file path, by default None
75
75
tags : list, optional
76
- Tags to use, e.g. /api/v2/tag/1:foo,/api/v2/tag/1:bar, by default None
76
+ Tags to use, e.g. /api/v2/tag/1:foo,/api/v2/tag/1:bar,
77
+ by default None
77
78
ephemeral_disks : str
78
79
Comma separated string containing ephemeral disks.
79
80
e.g: "/dev/nvme2n1,/dev/nvme2n2"
@@ -93,7 +94,10 @@ def create_with_ssh_key(
93
94
94
95
if ssh_key is not None and ssh_key_file is not None :
95
96
print (
96
- "Either ssh_key or ssh_key_file must be provided, but not both." ,
97
+ (
98
+ "Either ssh_key or ssh_key_file must be provided,"
99
+ " but not both."
100
+ ),
97
101
file = sys .stderr ,
98
102
)
99
103
sys .exit (1 )
@@ -125,7 +129,9 @@ def create_with_ssh_key(
125
129
126
130
tags_parsed = []
127
131
if tags is not None :
128
- tags_parsed = [dict (item .split (":" ) for item in tags .split ("," ))]
132
+ for tag in tags .split ("," ):
133
+ k , v = tag .split (":" )
134
+ tags_parsed .append ({"tag_id" : k , "tag_value" : v })
129
135
130
136
worker_id = base .get_client ().k8s_worker .create_with_ssh_key (
131
137
ip = ip ,
You can’t perform that action at this time.
0 commit comments