exe/conoharant in conoha-0.2.7 vs exe/conoharant in conoha-0.3.0
- old
+ new
@@ -12,11 +12,11 @@
config = YAML.load(File.open('Conoharantfile').read)
if File.exist? '.conoharant/status.yml'
status = YAML.load(File.open('.conoharant/status.yml').read)
else
status = {
- 'status' => 'no',
+ 'status' => 'nothing',
'id' => nil,
'images' => [],
'latestnumber' => 0,
'image-tags' => [],
}
@@ -119,17 +119,18 @@
result = Conoha.delete server_id
break if result == 'OK'
puts '# Error! Retry after 60 seconds...'
end
puts '# OK!'
- status['status'] = 'no'
+ status['status'] = 'nothing'
status['id'] = nil
status['images'] << image_id
status['latestnumber'] = latest_number
status['image-tags'] << name
dump_conoharant_status status
when 'restore'
- if status['status'] != 'no'
+ # TODO: Remove comparing to 'no'.
+ if status['status'] != 'no' && status['status'] != 'nothing'
STDERR.puts "A VPS already exists."
exit 1
end
image_id = status['images'][-1]
ram = config['ram']