Return-Path: X-Original-To: apmail-deltacloud-commits-archive@www.apache.org Delivered-To: apmail-deltacloud-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 633FA9B30 for ; Thu, 16 Feb 2012 12:32:27 +0000 (UTC) Received: (qmail 81654 invoked by uid 500); 16 Feb 2012 12:32:27 -0000 Delivered-To: apmail-deltacloud-commits-archive@deltacloud.apache.org Received: (qmail 81630 invoked by uid 500); 16 Feb 2012 12:32:27 -0000 Mailing-List: contact commits-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list commits@deltacloud.apache.org Received: (qmail 81622 invoked by uid 99); 16 Feb 2012 12:32:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 12:32:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.114] (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2012 12:32:26 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B495F32068B; Thu, 16 Feb 2012 12:32:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mfojtik@apache.org To: commits@deltacloud.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: EC2: Raise an 404 exception when trying to access non-existing instance Message-Id: <20120216123205.B495F32068B@tyr.zones.apache.org> Date: Thu, 16 Feb 2012 12:32:05 +0000 (UTC) Updated Branches: refs/heads/master 58372c1d2 -> f147e9f36 EC2: Raise an 404 exception when trying to access non-existing instance Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f147e9f3 Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f147e9f3 Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f147e9f3 Branch: refs/heads/master Commit: f147e9f360ae276544081d2d1419188e64423d89 Parents: 58372c1 Author: Michal Fojtik Authored: Thu Feb 16 13:31:51 2012 +0100 Committer: Michal fojtik Committed: Thu Feb 16 13:31:51 2012 +0100 ---------------------------------------------------------------------- server/lib/deltacloud/drivers/ec2/ec2_driver.rb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f147e9f3/server/lib/deltacloud/drivers/ec2/ec2_driver.rb ---------------------------------------------------------------------- diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb index 4569056..74e110f 100644 --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb @@ -184,6 +184,7 @@ module Deltacloud inst_arr = [] safely do ec2_inst = ec2.describe_instances([opts[:id]]).first + raise "Instance #{opts[:id]} NotFound" if ec2_inst.nil? instance = convert_instance(ec2_inst) return nil unless instance if ec2_inst[:aws_platform] == 'windows'