Class: Fog::Compute::Gridscale::MarketplaceTemplate
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Gridscale::MarketplaceTemplate
- Defined in:
- lib/fog/compute/gridscale/models/marketplace_template.rb
Instance Method Summary collapse
Instance Method Details
#delete ⇒ Object
24 25 26 27 28 |
# 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 ⇒ Object
30 31 32 33 34 |
# 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 ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# 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? = {} if attributes[:name] [:name] = name end if attributes[:labels] [:labels] = labels end if attributes[:capacity] [:capacity] = capacity end if attributes[:object_storage_path] [:object_storage_path] = object_storage_path end if attributes[:unique_hash] [:unique_hash] = unique_hash end data = service.marketplace_template_create() merge_attributes(data.body) true end |