Skip to content

Commit c7d595a

Browse files
cleverca22grahamc
authored andcommitted
Manager.create_project_ssh_key
1 parent 79438f8 commit c7d595a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packet/Manager.py

+7
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ def create_ssh_key(self, label, public_key):
193193
data = self.call_api("ssh-keys", type="POST", params=params)
194194
return SSHKey(data, self)
195195

196+
def create_project_ssh_key(self, project_id, label, public_key):
197+
params = {"key": public_key, "label": label}
198+
data = self.call_api(
199+
"projects/%s/ssh-keys" % project_id, type="POST", params=params
200+
)
201+
return SSHKey(data, self)
202+
196203
def list_volumes(self, project_id, params={}):
197204
params["include"] = "facility,attachments.device"
198205
data = self.call_api("projects/%s/storage" % project_id, params=params)

0 commit comments

Comments
 (0)