# File lib/deltacloud/drivers/google/google_driver.rb, line 32
  def buckets(credentials, opts={})
    buckets = []
    google_client = new_client(credentials)
    safely do
      if opts[:id]
        bucket = google_client.get_bucket(opts[:id])
        buckets << convert_bucket(bucket.body)
      else
        google_client.get_service.body['Buckets'].each do |bucket|
          buckets << Bucket.new({:name => bucket['Name'], :id => bucket['Name']})
        end
      end
    end
    buckets = filter_on(buckets, :id, opts)
  end