Return-Path: X-Original-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 789EE445E for ; Mon, 6 Jun 2011 15:35:02 +0000 (UTC) Received: (qmail 83290 invoked by uid 500); 6 Jun 2011 15:35:02 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 83266 invoked by uid 500); 6 Jun 2011 15:35:02 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 83258 invoked by uid 99); 6 Jun 2011 15:35:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 15:35:02 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mfojtik@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jun 2011 15:34:54 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p56FYWtK020633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 6 Jun 2011 11:34:32 -0400 Received: from dhcp-2-126.brq.redhat.com (dhcp-2-126.brq.redhat.com [10.34.2.126]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p56FYU1S028949 for ; Mon, 6 Jun 2011 11:34:31 -0400 From: mfojtik@redhat.com To: deltacloud-dev@incubator.apache.org Subject: Added api_url_for helper and DEFAULT_URI_PREFIX constant Date: Mon, 6 Jun 2011 17:35:12 +0200 Message-Id: <1307374515-40207-1-git-send-email-mfojtik@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Virus-Checked: Checked by ClamAV on apache.org Hi, This patch introduces new 'api_url_for' helper to support handling matrix parameters as 'driver' and 'provider'. Eg. you have URL 'http://example.org/api;driver=ec2/hardware_profiles', then all links inside API both in XML and HTML media type should contain this matrix parameters. This patch also ships DEFAULT_URI_PREFIX constant which replaces commonly and 'wrongly' used hardcoded '/api' prefix in url_for helper and in Sinatra route definitions. >From now, you should be able to deploy Deltacloud API on whatever URI you want, just by changing this constant. -- Michal