Sha256: d2a0119178436dbd4b7d5dd48aaf9a51d3a42fdfbb01ffe33b591dd359bfa61b

Contents?: true

Size: 1.25 KB

Versions: 8

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true
# Copyright 2018 Tristan Robert

# This file is part of Fog::Proxmox.

# Fog::Proxmox is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# Fog::Proxmox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with Fog::Proxmox. If not, see <http://www.gnu.org/licenses/>.

# frozen_string_literal: true

module Fog
  module Network
    class Proxmox
      # class Real list_networks request
      class Real
        def list_networks(path_params, query_params)
          node = path_params[:node]
          request(
            expects: [200],
            method: 'GET',
            path: "nodes/#{node}/network",
            query: URI.encode_www_form(query_params)
          )
        end
      end

      # class Mock list_networks request
      class Mock
        def list_networks; end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-proxmox-0.6.0 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.5.5 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.5.4 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.5.3 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.5.2 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.5.1 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.5.0 lib/fog/network/proxmox/requests/list_networks.rb
fog-proxmox-0.4.0 lib/fog/network/proxmox/requests/list_networks.rb