Sha256: 77657555d7473a675add5a11fad363b5924be1d20e38528245a0de9913f988ee

Contents?: true

Size: 949 Bytes

Versions: 17

Compression:

Stored size: 949 Bytes

Contents

require 'fog/ecloud/models/compute/backup_internet_service'

module Fog
  module Compute
    class Ecloud
      class BackupInternetServices < Fog::Ecloud::Collection
        identity :href

        model Fog::Compute::Ecloud::BackupInternetService

        def all
          data = service.get_backup_internet_services(href).body
          load(data)
        end

        def get(uri)
          if data = service.get_backup_internet_service(uri)
            new(data.body)
          end
        rescue Fog::Errors::NotFound
          nil
        end

        def from_data(data)
          new(data)
        end

        def create(options)
          options[:uri] = href + "/action/createBackupInternetService"
          options[:enabled] ||= true
          data = service.backup_internet_service_create(options)
          new(data)
        end

        def internet_service_id
          href.scan(/\d+/)[0]
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/ecloud/models/compute/backup_internet_services.rb
fog-ecloud-0.0.2 lib/fog/ecloud/models/compute/backup_internet_services.rb
fog-ecloud-0.0.1 lib/fog/ecloud/models/compute/backup_internet_services.rb
fog-1.25.0 lib/fog/ecloud/models/compute/backup_internet_services.rb
nsidc-fog-1.24.1 lib/fog/ecloud/models/compute/backup_internet_services.rb
fog-1.24.0 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.11 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.10 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.9 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.8 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.7 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.6 lib/fog/ecloud/models/compute/backup_internet_services.rb
fog-1.23.0 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.4 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.3 lib/fog/ecloud/models/compute/backup_internet_services.rb
ns-fog-1.22.2 lib/fog/ecloud/models/compute/backup_internet_services.rb
fog-1.22.1 lib/fog/ecloud/models/compute/backup_internet_services.rb