lib/fog/rackspace/models/compute/server.rb in fog-maestrodev-1.7.0.20121114190951 vs lib/fog/rackspace/models/compute/server.rb in fog-maestrodev-1.8.0.20130109172219

- old
+ new

@@ -26,27 +26,27 @@ super end def destroy requires :id - connection.delete_server(id) + service.delete_server(id) true end def flavor requires :flavor_id - connection.flavors.get(flavor_id) + service.flavors.get(flavor_id) end def image requires :image_id - connection.images.get(image_id) + service.images.get(image_id) end def images requires :id - connection.images(:server => self) + service.images(:server => self) end def private_ip_address addresses['private'].first end @@ -59,23 +59,23 @@ self.state == 'ACTIVE' end def reboot(type = 'SOFT') requires :id - connection.reboot_server(id, type) + service.reboot_server(id, type) true end def save - raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity + raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted? requires :flavor_id, :image_id options = { 'metadata' => metadata, 'name' => name, 'personality' => personality } options = options.reject {|key, value| value.nil?} - data = connection.create_server(flavor_id, image_id, options) + data = service.create_server(flavor_id, image_id, options) merge_attributes(data.body['server']) true end def setup(credentials = {})