Skip to content

Commit a4ffc20

Browse files
author
Jamie Hannaford
authored
Merge pull request #143 from laszlof/issue-122
Allow for public keys to be generated by OS, and private key returned
2 parents e1962df + f25c22d commit a4ffc20

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Compute/v2/Models/Keypair.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class Keypair extends OperatorResource implements Listable, Retrievable, Deletab
2525
/** @var string */
2626
public $publicKey;
2727

28+
/** @var string */
29+
public $privateKey;
30+
2831
/** @var boolean */
2932
public $deleted;
3033

@@ -36,9 +39,10 @@ class Keypair extends OperatorResource implements Listable, Retrievable, Deletab
3639

3740
/** @var \DateTimeImmutable */
3841
public $createdAt;
39-
42+
4043
protected $aliases = [
4144
'public_key' => 'publicKey',
45+
'private_key' => 'privateKey',
4246
'user_id' => 'userId',
4347
'created_at' => 'createdAt',
4448
];

src/Compute/v2/Params.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ public function keypairPublicKey(): array
388388
{
389389
return [
390390
'type' => self::STRING_TYPE,
391-
'required' => true,
392391
'sentAs' => 'public_key',
393392
'location' => self::JSON,
394393
'description' => 'The public ssh key to import. If you omit this value, a key is generated.',

0 commit comments

Comments
 (0)