lib/fog/terremark/models/shared/server.rb in fog-maestrodev-1.8.0.20130114204828 vs lib/fog/terremark/models/shared/server.rb in fog-maestrodev-1.14.0.20130806165225

- old
+ new

@@ -39,10 +39,12 @@ return false when VAppStatus::POWERED_ON data = service.power_off(self.id).body wait_for { off? } end + #Failsafe .. Always check if we are ready + wait_for { ready? } service.delete_vapp(self.id) true end def PublicIpAddress @@ -58,16 +60,16 @@ end def delete_internet_services #Find the internet service - while (service = internet_services.pop) do + while (inet_service = internet_services.pop) do - nodes = service.nodeservices.all(service.Id) + nodes = service.nodeservices.all(inet_service.Id) #Delete all the associated nodes nodes.select { |item| item.destroy } #Clear out the services - service.destroy(delete_public_ip = !(internet_services.size > 0)) + inet_service.destroy(delete_public_ip = !(internet_services.size > 0)) end true end # { '0' => 'Being created', '2' => 'Powered Off', '4' => 'Powered On'}