Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-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 1E34C191D5 for ; Tue, 26 Apr 2016 12:08:13 +0000 (UTC) Received: (qmail 82976 invoked by uid 500); 26 Apr 2016 12:08:13 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 82944 invoked by uid 500); 26 Apr 2016 12:08:13 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 82928 invoked by uid 99); 26 Apr 2016 12:08:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Apr 2016 12:08:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DADAA2C1F54 for ; Tue, 26 Apr 2016 12:08:12 +0000 (UTC) Date: Tue, 26 Apr 2016 12:08:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@brooklyn.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-257) Can't replace imageId with imageNameRegex in jcloudsLocation.obtain(Map) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BROOKLYN-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257961#comment-15257961 ] ASF GitHub Bot commented on BROOKLYN-257: ----------------------------------------- Github user aledsage commented on the pull request: https://github.com/apache/brooklyn-server/pull/115#issuecomment-214718946 Cherry-picking this into 0.9.x branch. > Can't replace imageId with imageNameRegex in jcloudsLocation.obtain(Map) > ------------------------------------------------------------------------ > > Key: BROOKLYN-257 > URL: https://issues.apache.org/jira/browse/BROOKLYN-257 > Project: Brooklyn > Issue Type: Bug > Reporter: Aled Sage > Fix For: 0.9.0 > > > A customer has a pre-defined AWS location (which could be a named location in brooklyn.properties, or a location added to the catalog) that defines a imageId. When calling {{location.obtain(Map)}}, they want to override the image choice by passing in an imageNameRegex instead. However, the imageId always takes precedence. > If they try to pass in a map of {{ {imageId: null, imageNameRegex: myval} }}, then it gives an error like: > {noformat} > java.lang.NullPointerException > at org.apache.brooklyn.location.jclouds.JcloudsLocation$6.apply(JcloudsLocation.java:1153) > at org.apache.brooklyn.location.jclouds.JcloudsLocation.buildTemplate(JcloudsLocation.java:1493) > at org.apache.brooklyn.location.jclouds.JcloudsLocation.obtainOnce(JcloudsLocation.java:682) > at org.apache.brooklyn.location.jclouds.JcloudsLocation.obtain(JcloudsLocation.java:614) > at org.apache.brooklyn.location.jclouds.AbstractJcloudsLiveTest.obtainMachine(AbstractJcloudsLiveTest.java:141) > at org.apache.brooklyn.location.jclouds.JcloudsImageChoiceStubbedLiveTest.testJcloudsCreateWithImageDescriptionRegex(JcloudsImageChoiceStubbedLiveTest.java:80) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)