compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (12)

View Page History

{code:php}

$user= 'xxx';
$key= 'yyy';

if ($server===false) {
printf ("Error code: %s\n",$rackspace->getErrorCode()); die("ERROR: ".$rackspace->getErrorMsg());
printf ("Error msg: %s\n",$rackspace->getErrorMsg());
} else {
printf ("Name: %s\n",$server->getName());
printf ("Id: %s\n",$server->getId());
$ips= $server->getPublicIp();
printf ("IP public: %s\n",$ips[0]);
echo "Metadata:\n";
print_r($server->getMetadata());
printf ("Admin password: %s\n",$server->getAdminPass());
}

printf ("Name: %s\n",$server->getName());
printf ("Id: %s\n",$server->getId());
$ips= $server->getPublicIp();
printf ("IP public: %s\n",$ips[0]);
echo "Metadata:\n";
print_r($server->getMetadata());
printf ("Admin password: %s\n",$server->getAdminPass());

{code}

$server= $rackspace->getServer('20056589');

if ($server!==false) ($server===false) {
printf("Name: %s\n",$server->getName()); die("ERROR: ".$rackspace->getErrorMsg());
printf("Id: %s\n",$server->getId());
printf("Flavor Id: %s\n",$server->getFlavorId());
} else {
printf ("Error code: %s\n",$rackspace->getErrorCode());
printf ("Error msg: %s\n",$rackspace->getErrorMsg());
}

printf("Name: %s\n",$server->getName());
printf("Id: %s\n",$server->getId());
printf("Flavor Id: %s\n",$server->getFlavorId());

{code}
$servers= $rackspace->listServers(true);

if ($servers!==false) ($servers===false) {
foreach ($servers as $srv) { die("ERROR: ".$rackspace->getErrorMsg());
printf("Name: %s\n",$srv->getName());
printf("Id: %s\n",$srv->getId());
printf("Flavor Id: %s\n",$srv->getFlavorId());
printf("Image Id: %s\n",$srv->getImageId());
printf("Status: %s\n\n",$srv->getStatus());
}
} else {
printf ("Error code: %s\n",$rackspace->getErrorCode());
printf ("Error msg: %s\n",$rackspace->getErrorMsg());
}

foreach ($servers as $srv) {
printf("Name: %s\n",$srv->getName());
printf("Id: %s\n",$srv->getId());
printf("Flavor Id: %s\n",$srv->getFlavorId());
printf("Image Id: %s\n",$srv->getImageId());
printf("Status: %s\n\n",$srv->getStatus());
}
{code}