Hostname is now no longer available until after the server is running.

This commit is contained in:
Technosophos 2012-07-05 15:24:28 -05:00
parent c50b708880
commit 63d23df388
2 changed files with 10 additions and 4 deletions

View File

@ -58,6 +58,10 @@ class InstanceDetails {
$o->password = $json['credential']['password']; $o->password = $json['credential']['password'];
} }
if (!empty($json['name'])) {
$o->name = $json['name'];
}
return $o; return $o;
} }
@ -138,8 +142,8 @@ class InstanceDetails {
* is returned. * is returned.
* *
* @attention * @attention
* In version 1.0 of the DBaaS protocol, this is ONLY available immediately * In version 1.0 of the DBaaS protocol, this is ONLY available after the
* after creation or from the results of an Instance::describe() call. * DB instance has been brought all the way up.
* *
* This returns the DNS name of the host (or possibly an IP address). * This returns the DNS name of the host (or possibly an IP address).
* *

View File

@ -68,7 +68,8 @@ class DBaaSInstanceTest extends DBaaSTestCase {
$this->assertNotEmpty($details->username()); $this->assertNotEmpty($details->username());
$this->assertNotEmpty($details->password()); $this->assertNotEmpty($details->password());
$this->assertNotEmpty($details->id()); $this->assertNotEmpty($details->id());
$this->assertNotEmpty($details->hostname()); // This is now no longer returned from a create().
//$this->assertNotEmpty($details->hostname());
$this->assertNotEmpty($details->createdOn()); $this->assertNotEmpty($details->createdOn());
$this->assertEquals($dbName, $details->name()); $this->assertEquals($dbName, $details->name());
@ -101,7 +102,8 @@ class DBaaSInstanceTest extends DBaaSTestCase {
$this->assertEmpty($details->username()); $this->assertEmpty($details->username());
$this->assertEmpty($details->password()); $this->assertEmpty($details->password());
$this->assertNotEmpty($details->hostname()); // This is no longer available until after the server is up.
//$this->assertNotEmpty($details->hostname());
$this->assertNotEmpty($details->createdOn()); $this->assertNotEmpty($details->createdOn());
$this->assertEquals($db->id(), $details->id()); $this->assertEquals($db->id(), $details->id());