Skip to content

Commit e5f2a08

Browse files
README changes
1 parent d0032a7 commit e5f2a08

4 files changed

Lines changed: 23 additions & 27 deletions

File tree

README.md

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ so that you can still use the SDK with a pure OpenStack instance
1616

1717
Requirements
1818
------------
19-
* PHP >= 5.3.3
19+
* PHP >=5.3.3
2020
* cURL extension for PHP
2121

2222
Installation
@@ -56,27 +56,13 @@ If you'd like to contribute, see the
5656

5757
Further Reading
5858
---------------
59-
The file
60-
[docs/quickref.md](https://github.com/rackspace/php-opencloud/blob/master/docs/quickref.md)
61-
contains a Quick Reference
62-
guide to the
63-
**php-opencloud** library.
64-
65-
The source for the "Getting Started with
66-
**php-opencloud**" document (the user guide) starts in
67-
[docs/userguide/index.md](https://github.com/rackspace/php-opencloud/blob/master/docs/userguide/index.md).
68-
69-
There is a complete (auto-generated) API reference manual in the
70-
docs/api directory. Start with docs/api/index.html.
59+
The file [docs/quickref.md](https://github.com/rackspace/php-opencloud/blob/master/docs/quickref.md) contains a Quick
60+
Reference guide to the **php-opencloud** library.
7161

72-
See the [HOWTO.md](https://github.com/rackspace/php-opencloud/blob/master/HOWTO.md) file for instructions on
73-
regenerating the documentation and running tests.
74-
75-
See the [smoketest.php](https://github.com/rackspace/php-opencloud/blob/master/smoketest.php) file for some
76-
simple, working examples. This is a test we run before builds to ensure that all
77-
the core functionality is still working after code changes.
62+
The source for the "Getting Started with **php-opencloud**" document (the user guide) starts in
63+
[docs/userguide/index.md](https://github.com/rackspace/php-opencloud/blob/master/docs/userguide/index.md).
7864

79-
The [samples/](https://github.com/rackspace/php-opencloud/tree/master/samples/) directory has a collection
80-
of tested, working sample code. Note that these may create objects in your cloud
81-
for which you could be charged.
65+
To generate the API reference manual for viewing, please execute: `sh ./docs/generate.sh` from the base directory.
8266

67+
If you'd like to contribute to the project, or require help running the unit/acceptance tests, please view the
68+
[contributing guidelines](https://github.com/rackspace/php-opencloud/blob/master/CONTRIBUTING.md).

lib/OpenCloud/Common/PersistentObject.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,15 @@ public function create($params = array())
216216
))
217217
->send();
218218

219-
if ($location = $response->getHeader('Location')) {
220-
$this->refreshFromLocationUrl($location);
221-
} elseif (null !== ($decoded = $this->parseResponse($response))) {
219+
// We have to try to parse the response body first because it should have precedence over a Location refresh.
220+
// I'd like to reverse the order, but Nova instances return ephemeral properties on creation which are not
221+
// available when you follow the Location link...
222+
if (null !== ($decoded = $this->parseResponse($response))) {
222223
$this->populate($decoded);
224+
} elseif ($location = $response->getHeader('Location')) {
225+
$this->refreshFromLocationUrl($location);
223226
}
224-
227+
225228
return $response;
226229
}
227230

tests/OpenCloud/Smoke/Unit/CloudMonitoring.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,17 @@ public function doEntityBlock()
9898

9999
public function doEntityTeardown()
100100
{
101+
$this->step('Deleting entities');
102+
101103
$entities = $this->getService()->getEntities();
102104
while ($entity = $entities->next()) {
103105
if ($this->shouldDelete($entity->getLabel())) {
104106
try {
107+
$this->stepInfo('Deleting entity: ID [%s], label [%s]', $entity->getId(), $entity->getLabel());
105108
$entity->delete();
106-
} catch (\Guzzle\Http\Exception\ClientErrorResponseException $e) {}
109+
} catch (\Guzzle\Http\Exception\ClientErrorResponseException $e) {
110+
$this->stepInfo('Could not delete entity: ID [%s], label [%s]', $entity->getId(), $entity->getLabel());
111+
}
107112
}
108113
}
109114
}

tests/OpenCloud/Smoke/Unit/Compute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ public function main()
135135
),
136136
"OS-DCF:diskConfig" => "AUTO"
137137
));
138+
138139
$adminPassword = $server->adminPass;
140+
$this->stepInfo('ADMIN PASSWORD = %s', $adminPassword);
139141

140142
$this->step('Wait for Server create');
141143
$server->waitFor('ACTIVE', 600, $this->getWaiterCallback());

0 commit comments

Comments
 (0)