# File lib/deltacloud/drivers/rackspace/rackspace_driver.rb, line 194
  def buckets(credentials, opts = {})
    bucket_list = []
    cf = cloudfiles_client(credentials)
    safely do
      unless (opts[:id].nil?)
        bucket = cf.container(opts[:id])
        bucket_list << convert_container(bucket)
      else
        cf.containers.each do |container_name|
          bucket_list << Bucket.new({:id => container_name, :name => container_name})
        end #containers.each
      end #unless
    end #safely
    filter_on(bucket_list, :id, opts)
  end