Class: Chef::Knife::AcropolisSnapshotDelete

Inherits:
Chef::Knife
  • Object
show all
Includes:
AcropolisBase
Defined in:
lib/chef/knife/acropolis_snapshot_delete.rb

Instance Method Summary collapse

Methods included from AcropolisBase

#delete, #get, included, #post

Instance Method Details

#runObject



28
29
30
31
32
33
34
35
# File 'lib/chef/knife/acropolis_snapshot_delete.rb', line 28

def run    
  validate 
  
  specs = Chef::Config[:knife][:snapUuid].to_s
  p specs
  task = delete("/snapshots", specs)
  p task
end

#validateObject



21
22
23
24
25
26
# File 'lib/chef/knife/acropolis_snapshot_delete.rb', line 21

def validate
  unless  Chef::Config[:knife][:snapUuid] 
    ui.error('Missing ID. Use -S (--snap-uuid) to set the snapshot ID for deletion. Use "knife acropolis snapshot list" to find the UUID.')
    exit 1
  end
end