Skip to content

Commit 0aad1d0

Browse files
committed
Compute: keypairType
1 parent 73502af commit 0aad1d0

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/Compute/v2/Api.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,8 @@ public function postKeypair(): array
667667
'params' => [
668668
'name' => $this->isRequired($this->params->name('keypair')),
669669
'publicKey' => $this->params->keypairPublicKey(),
670+
'type' => $this->params->keypairType(),
671+
'userId' => $this->params->keypairUserId(),
670672
],
671673
];
672674
}

src/Compute/v2/Models/Keypair.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class Keypair extends OperatorResource implements Listable, Retrievable, Deletab
3737
/** @var string */
3838
public $userId;
3939

40+
/** @var string */
41+
public $type;
42+
4043
/** @var string */
4144
public $id;
4245

@@ -47,6 +50,7 @@ class Keypair extends OperatorResource implements Listable, Retrievable, Deletab
4750
'public_key' => 'publicKey',
4851
'private_key' => 'privateKey',
4952
'user_id' => 'userId',
53+
'type' => 'type',
5054
];
5155

5256
protected $resourceKey = 'keypair';

src/Compute/v2/Params.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,25 @@ public function userId(): array
475475
];
476476
}
477477

478+
public function keypairUserId(): array
479+
{
480+
return [
481+
'type' => self::STRING_TYPE,
482+
'sentAs' => 'user_id',
483+
'location' => self::JSON,
484+
'description' => 'This allows administrative users to upload keys for other users than themselves. Requires micro version 2.10.',
485+
];
486+
}
487+
488+
public function keypairType(): array
489+
{
490+
return [
491+
'type' => self::STRING_TYPE,
492+
'location' => self::JSON,
493+
'description' => 'The type of the keypair. Allowed values are ssh or x509. Require micro version 2.2.',
494+
];
495+
}
496+
478497
public function flavorRam(): array
479498
{
480499
return [

0 commit comments

Comments
 (0)