Skip to content

Commit c475425

Browse files
author
Jamie Hannaford
committed
Merge pull request rackspace#600 from notFloran/fix-create-server-volume-samples
Fix samples for "create server from bootable volume"
2 parents 63c1cb1 + fdce9cc commit c475425

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

samples/Compute/create_server_from_bootable_volume.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
$response = $server->create(array(
4848
'name' => '{serverName}',
4949
'imageId' => '{imageId}',
50-
'flavorId' => '{flavorId}'
50+
'flavorId' => '{flavorId}',
51+
'volume' => $bootableVolume
5152
));
5253
} catch (BadResponseException $e) {
5354
echo $e->getResponse();

samples/Compute/create_server_from_bootable_volume_delete_on_termination.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@
4747
// list_images.php scripts.
4848
try {
4949
$response = $server->create(array(
50-
'name' => '{serverName}',
51-
'imageId' => '{imageId}',
52-
'flavorId' => '{flavorId}'
50+
'name' => '{serverName}',
51+
'imageId' => '{imageId}',
52+
'flavorId' => '{flavorId}',
53+
'volume' => $bootableVolume,
54+
'volumeDeleteOnTermination' => true
5355
));
5456
} catch (BadResponseException $e) {
5557
echo $e->getResponse();

0 commit comments

Comments
 (0)