Sha256: f6ecb37cc0b3f12d5b94f8cab4926c39497c51ff32d80dad366870a5d390821a

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

module Fog
  module Compute
    class OneAndOne

      class Real

        ##
        # Lists usages and alerts of monitoring servers
        # URL: [https://cloudpanel-api.1and1.com/documentation/1and1/v1/en/documentation.html#monitoring_center_get]
        ##
        def list_monitored_servers(page: nil, per_page: nil, sort: nil, q: nil,
          fields: nil)
          
          # Build hash for query parameters
          keyword_args = {
            :page => page,
            :per_page => per_page,
            :sort => sort,
            :q => q,
            :fields => fields
          }

          # Clean out null query parameters
          query = clean_hash(keyword_args)

          # Request
          params = {
            'method' => :get,
            'endpoint' => '/monitoring_center',
            'params' => query
          }

          request(params)

        end

      end # Real

      
      class Mock

        def list_monitored_servers(page: nil, per_page: nil, sort: nil, q: nil,
          fields: nil)
          Fog::Mock.not_implemented
        end

      end # Mock

    end # OneAndOne
  end # Compute
end # Fog

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-oneandone-1.2 lib/oneandone/requests/compute/list_monitored_servers.rb
fog-oneandone-1.0 lib/oneandone/requests/compute/list_monitored_servers.rb