|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (6)
View Page History<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}
{zone-data:component-name}
Zend_Service_Rackspace
Zend_Service_Rackspace
||UC2-02||
Get a server, specifing using the ID of the server.
{code:php}
$rackspace= new Zend\Service\Rackspace\Servers($user,$key);
$server= $rackspace->getServer('20056589'); $rackspace->getServer('id');
if ($server===false) {
{code}
||UC2-04||
Change the name of a server. The parameter of listServers() is a boolean flag to get a list of server with detailed information (true) or not (false).
{code:php}
$user= 'xxx';
$key= 'yyy';
$rackspace= new Zend\Service\Rackspace\Servers($user,$key);
if ($rackspace->changeServerName('id','new name')) {
echo "The name of the server has been changed successfully\n";
} else {
die("ERROR: ".$rackspace->getErrorMsg());
}
{code}
||UC2-05||
Change the admin password of a server. For security reason the admin password is returned only when you create a server.
{code:php}
$user= 'xxx';
$key= 'yyy';
$rackspace= new Zend\Service\Rackspace\Servers($user,$key);
if ($rackspace->changeServerPassword('id','new password')) {
echo "The admin password of the server has been changed successfully\n";
} else {
die("ERROR: ".$rackspace->getErrorMsg());
}
{code}
{zone-data}
{zone-data}
{zone-template-instance}
{zone-template-instance}]]></ac:plain-text-body></ac:macro>