Ejemplo n.º 1
0
 /**
  * List registered keypairs
  *
  * @param ListSshKeyPairsData|array $filter Request data object
  * @param PaginationType $pagination Pagination
  * @return SshKeyResponseList|null
  */
 public function describe($filter = null, PaginationType $pagination = null)
 {
     if ($filter !== null && !$filter instanceof ListSshKeyPairsData) {
         $filter = ListSshKeyPairsData::initArray($filter);
     }
     return $this->getApiHandler()->listSSHKeyPairs($filter, $pagination);
 }
Ejemplo n.º 2
0
 /**
  * List registered keypairs
  *
  * @param ListSshKeyPairsData $requestData Request data object
  * @param PaginationType $pagination Pagination
  * @return SshKeyResponseList|null
  */
 public function listSSHKeyPairs(ListSshKeyPairsData $requestData = null, PaginationType $pagination = null)
 {
     $result = null;
     $args = array();
     if ($requestData !== null) {
         $args = $requestData->toArray();
     }
     if ($pagination !== null) {
         $args = array_merge($args, $pagination->toArray());
     }
     $response = $this->getClient()->call('listSSHKeyPairs', $args);
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (property_exists($resultObject, 'count') && $resultObject->count > 0) {
             $result = $this->_loadSshKeyPairList($resultObject->sshkeypair);
         }
     }
     return $result;
 }