public function createContainer($name, ACL $acl = NULL, $metadata = array()) {
    $url = $this->url() . '/' . rawurlencode($name);
    $headers = array(
      'X-Auth-Token' => $this->token(),
    );

    if (!empty($metadata)) {
      $prefix = Container::CONTAINER_METADATA_HEADER_PREFIX;
      $headers += Container::generateMetadataHeaders($metadata, $prefix);
    }

    $client = \HPCloud\Transport::instance();
    // Add ACLs to header.
    if (!empty($acl)) {
      $headers += $acl->headers();
    }

    $data = $client->doRequest($url, 'PUT', $headers);
    //syslog(LOG_WARNING, print_r($data, TRUE));

    $status = $data->status();

    if ($status == 201) {
      return TRUE;
    } elseif ($status == 202) {
      return FALSE;
    }
    // According to the OpenStack docs, there are no other return codes.
    else {
      throw new \HPCloud\Exception('Server returned unexpected code: ' . $status);
    }
  }