Sha256: 6c980041e3f8a6cbde8314383e244d28de03d274e248b730a35d7657d62e4d63
Contents?: true
Size: 841 Bytes
Versions: 21
Compression:
Stored size: 841 Bytes
Contents
require 'fog/core/collection' require 'fog/cloudstack/models/compute/public_ip_address' module Fog module Compute class Cloudstack class PublicIpAddresses < Fog::Collection model Fog::Compute::Cloudstack::PublicIpAddress def all(options = {}) response = service.list_public_ip_addresses(options) public_ip_addresses = response["listpublicipaddressesresponse"]["publicipaddress"] || [] load(public_ip_addresses) end def get(address_id) response = service.list_public_ip_addresses('id' => address_id) if public_ip_address = response["listpublicipaddressesresponse"]["publicipaddress"].first new(public_ip_address) end rescue Fog::Compute::Cloudstack::BadRequest nil end end end end end
Version data entries
21 entries across 19 versions & 3 rubygems