Beispiel #1
0
 /**
  * List LBaaS Health Monitors action (GET /lb/health_monitors[/health-monitors-id])
  *
  * @param   string                           $healthMonitorId  optional The ID of the health monitor to show detailed info
  * @param   ListLbHealthMonitorsFilter|array $filter           optional The query filter.
  * @return  DefaultPaginationList|object Returns the list of the Health Monitors or the requested pool
  * @throws  RestClientException
  */
 public function listLbHealthMonitors($healthMonitorId = null, $filter = null)
 {
     if ($filter !== null && !$filter instanceof ListLbHealthMonitorsFilter) {
         $filter = ListLbHealthMonitorsFilter::initArray($filter);
     }
     return $this->getApiHandler()->listLbHealthMonitors($healthMonitorId, $filter);
 }
Beispiel #2
0
 /**
  * List LBaaS Health Monitors action (GET /lb/health_monitors[/health-monitors-id])
  *
  * @param   string                     $healthMonitorId  optional The ID of the health monitor to show detailed info
  * @param   ListLbHealthMonitorsFilter $filter           optional The query filter.
  * @return  DefaultPaginationList|object Returns the list of the Health Monitors or the requested pool
  * @throws  RestClientException
  */
 public function listLbHealthMonitors($healthMonitorId = null, ListLbHealthMonitorsFilter $filter = null)
 {
     $result = null;
     $detailed = $healthMonitorId !== null ? sprintf("/%s", $this->escape($healthMonitorId)) : '';
     $response = $this->getClient()->call($this->service, '/lb/health_monitors' . $detailed . ($filter !== null ? '?' . $filter->getQueryString() : ''));
     if ($response->hasError() === false) {
         $result = json_decode($response->getContent());
         if (empty($detailed)) {
             $result = new DefaultPaginationList($this->service, 'health_monitors', $result->health_monitors, isset($result->health_monitors_links) ? $result->health_monitors_links : null);
         } else {
             $result = $result->health_monitor;
         }
     }
     return $result;
 }