Skip to content

Commit 57e0228

Browse files
authored
Merge pull request #33 from AmineChikhaoui/device-ssh-keys
adding the ability to pass ssh keys during the creation of the device.
2 parents b57d0bc + 5a41f34 commit 57e0228

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packet/Device.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, data, manager):
2020
self.plan = data['plan']
2121
self.spot_instance = data.get('spot_instance')
2222
self.spot_price_max = data.get('spot_price_max')
23+
self.ssh_keys = data.get('ssh_keys', [])
2324
self.state = data['state']
2425
self.tags = data['tags']
2526
self.termination_time = data.get('termination_time')

packet/Manager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ def create_device(self,
8282
features={},
8383
ipxe_script_url='',
8484
locked=False,
85+
project_ssh_keys=[],
8586
public_ipv4_subnet_size=31,
8687
spot_instance=False,
8788
spot_price_max=-1,
8889
tags={},
8990
termination_time=None,
91+
user_ssh_keys=[],
9092
userdata=''):
9193

9294
params = {
@@ -99,7 +101,9 @@ def create_device(self,
99101
'plan': plan,
100102
'project_id': project_id,
101103
'public_ipv4_subnet_size': public_ipv4_subnet_size,
104+
'project_ssh_keys': project_ssh_keys,
102105
'tags': tags,
106+
'user_ssh_keys': user_ssh_keys,
103107
'userdata': userdata,
104108
}
105109

0 commit comments

Comments
 (0)