Skip to content

Commit b5f7ec9

Browse files
authored
Merge pull request #75 from grahamc/create-project-ssh-key
Manager.create_project_ssh_key
2 parents 090ef65 + c7d595a commit b5f7ec9

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
@@ -196,6 +196,13 @@ def create_ssh_key(self, label, public_key):
196196
data = self.call_api("ssh-keys", type="POST", params=params)
197197
return SSHKey(data, self)
198198

199+
def create_project_ssh_key(self, project_id, label, public_key):
200+
params = {"key": public_key, "label": label}
201+
data = self.call_api(
202+
"projects/%s/ssh-keys" % project_id, type="POST", params=params
203+
)
204+
return SSHKey(data, self)
205+
199206
def list_volumes(self, project_id, params={}):
200207
params["include"] = "facility,attachments.device"
201208
data = self.call_api("projects/%s/storage" % project_id, params=params)

0 commit comments

Comments
 (0)