|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (48)
View Page History...
{kb-resolution}
The issue has been corrected in CDP 4.2.0. Freebytes and devices are now displayed correctly.
{code}
<?
try
{
//get a list of paths
$client = new soapclient('http://10.230.106.78:9080/StorageDisk?wsdl',
array(
'login'=>'admin',
'password'=>'bobbit',
'trace'=>1
)
);
$response=$client->getStorageDiskPaths() ;
if (is_array($response->return))
{
foreach ($response->return as $device)
{
if ($device != 'none')
{
$devices[] = $device;
}
}
}
else
{
}
}
}
else
{
$devices[] = $device; $response->return;
}
}
catch (SoapFault $exception)
} {
return array("API Failure: $exception");
else }
{
$devices[] = $response->return;
}
}
catch (SoapFault $exception)
{
return array("API Failure: $exception");
}
$devices[] = $response->return;
}
}
catch (SoapFault $exception)
{
return array("API Failure: $exception");
}
$largest_bytes = 0;
foreach ($devices as $device)
{
//find the one with the most free space
try
{
$response=$client->getStorageDiskByPath(array('storageDiskPath'=>$device)) ;
echo $device . " " . $response->return->freeBytes . "\r\n";
}
catch (SoapFault $exception)
{
return array("API Failure: $exception");
}
}
foreach ($devices as $device)
{
//find the one with the most free space
try
{
echo $device . " " . $response->return->freeBytes . "\r\n";
}
catch (SoapFault $exception)
{
return array("API Failure: $exception");
}
}
foreach ($devices as $device)
{
//find the one with the most free space
try
{
#$response=$client->getStorageDiskByPath(array('storageDiskPath'=>$device)) ;
$response=$client->getStorageDiskByPath(array('storageDiskPath'=>"$device")) ;
#echo $device . " " . $response->return->freeBytes . "\r\n";
echo $device . " " . $response->return->path . "\r\n";
}
catch (SoapFault $exception)
{
return array("API Failure: $exception");
echo "API Failure: $exception";
}
}
foreach ($devices as $device)
{
//find the one with the most free space
try
{
#$response=$client->getStorageDiskByPath(array('storageDiskPath'=>$device)) ;
$response=$client->getStorageDiskByPath(array('storageDiskPath'=>"$device")) ;
#echo $device . " " . $response->return->freeBytes . "\r\n";
echo $device . " " . $response->return->path . "\r\n";
}
catch (SoapFault $exception)
{
echo "API Failure: $exception";
}
}
{
//find the one with the most free space
try
{
#$response=$client->getStorageDiskByPath(array('storageDiskPath'=>$device)) ;
$response=$client->getStorageDiskByPath(array('storageDiskPath'=>"$device")) ;
#echo $device . " " . $response->return->freeBytes . "\r\n";
echo $device . " " . $response->return->path . "\r\n";
}
catch (SoapFault $exception)
{
echo "API Failure: $exception";
}
}
?>
{code}
...