class Fog::Compute::Gridscale::MarketplaceTemplate

Public Instance Methods

delete() click to toggle source
# File lib/fog/compute/gridscale/models/marketplace_template.rb, line 24
def delete
  requires :object_uuid
  response = service.marketplace_template_delete object_uuid
  response.body
end
destroy() click to toggle source
# File lib/fog/compute/gridscale/models/marketplace_template.rb, line 30
def destroy
  requires :object_uuid
  response = service.marketplace_template_delete object_uuid
  response.body
end
save() click to toggle source
# File lib/fog/compute/gridscale/models/marketplace_template.rb, line 36
def save
  raise Fog::Errors::Error.new('Re-saving an existing object may create a duplicate') if persisted?

  options = {}

  if attributes[:name]
    options[:name] = name
  end

  if attributes[:labels]
    options[:labels] = labels
  end

  if attributes[:capacity]
    options[:capacity] = capacity
  end

  if attributes[:object_storage_path]
    options[:object_storage_path] = object_storage_path
  end

  if attributes[:unique_hash]
    options[:unique_hash] = unique_hash
  end

  data = service.marketplace_template_create(options)


  merge_attributes(data.body)
  true
end