Skip to content

Commit 1419eb2

Browse files
author
Jamie Hannaford
committed
Merge pull request #38 from kunalp/create-server-w-key-name
Add keyName as an option when creating servers
2 parents 15aca73 + f8bedb6 commit 1419eb2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Compute/v2/Api.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public function postServer()
163163
'availabilityZone' => $this->params->availabilityZone(),
164164
'networks' => $this->params->networks(),
165165
'blockDeviceMapping' => $this->params->blockDeviceMapping(),
166+
'keyName' => $this->params->keyName()
166167
]
167168
];
168169
}

src/Compute/v2/Params.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,4 +369,14 @@ public function networkLabel()
369369
'required' => true,
370370
];
371371
}
372+
373+
public function keyName()
374+
{
375+
return [
376+
'type' => self::STRING_TYPE,
377+
'required' => false,
378+
'sentAs' => 'key_name',
379+
'description' => 'The key name',
380+
];
381+
}
372382
}

0 commit comments

Comments
 (0)