# File lib/rudy/aws/ec2/volume.rb, line 200
200:       def self.from_hash(h)
201:         vol = Rudy::AWS::EC2::Volume.new
202:         vol.status = h['status']
203:         vol.size = h['size']
204:         vol.snapid = h['snapshotId']
205:         vol.zone = h['availabilityZone']
206:         vol.awsid = h['volumeId']
207:         vol.created = h['createTime']
208:         if h['attachmentSet'].is_a?(Hash)
209:           item = h['attachmentSet']['item'].first
210:           vol.status = item['status']   # Overwrite "available status". Possibly a bad idea. 
211:           vol.device = item['device']
212:           vol.attached = item['attachTime']
213:           vol.instid = item['instanceId']
214:         end
215:         vol.postprocess
216:         vol
217:       end