Sha256: ed5db7bfebcc2c4dd412440efa2db15fdedc1b82b6bcc7bd2a9e706a5f4ce7d5
Contents?: true
Size: 1.44 KB
Versions: 2
Compression:
Stored size: 1.44 KB
Contents
require File.expand_path('../../../helpers/compute/data_helper', __FILE__) module Fog module Compute class ProfitBricks class IpBlock < Fog::Models::ProfitBricks::Base include Fog::Helpers::ProfitBricks::DataHelper identity :id # properties attribute :ips attribute :location attribute :size attribute :name # metadata attribute :created_date, :aliases => 'createdDate', :type => :time attribute :created_by, :aliases => 'createdBy' attribute :last_modified_date, :aliases => 'lastModifiedDate', :type => :time attribute :last_modified_by, :aliases => 'lastModifiedBy' attribute :request_id, :aliases => 'requestId' attribute :state def initialize(attributes = {}) super end def save requires :location, :size properties = {} properties[:location] = location if location properties[:size] = size if size properties[:name] = name if name data = service.create_ip_block(properties) merge_attributes(flatten(data.body)) true end def delete requires :id service.delete_ip_block(id) true end def ready? state == 'AVAILABLE' end def failed? state == 'ERROR' end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-profitbricks-4.0.0 | lib/fog/profitbricks/models/compute/ip_block.rb |
fog-profitbricks-3.0.0 | lib/fog/profitbricks/models/compute/ip_block.rb |