Sha256: c0318aec980455b2cd52cfecf8176df8cbadd88ff4c51c238b02977e74c159b6
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
module FogExtensions module DigitalOcean module Server extend ActiveSupport::Concern attr_accessor :image_id def identity_to_s identity.to_s end def vm_description flavor.try(:name) end def flavor requires :flavor_id @flavor ||= service.flavors.get(flavor_id.to_i) end def flavor_name requires :flavor @flavor_name ||= @flavor.try(:name) end def image requires :image_id @image ||= service.images.get(image_id.to_i) end def image_name @image_name ||= @image.try(:name) end def region requires :region_id @region ||= service.regions.get(region_id.to_i) end def region_name requires :region @region_name ||= @region.try(:name) end def ip_addresses [public_ip_address, private_ip_address].flatten.select(&:present?) end def state requires :status @state ||= status end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
foreman_digitalocean-1.1.0 | app/models/concerns/fog_extensions/digitalocean/server.rb |
foreman_digitalocean-1.0.0 | app/models/concerns/fog_extensions/digitalocean/server.rb |