Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EBBE9200C80 for ; Thu, 25 May 2017 15:28:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EA3A3160BCA; Thu, 25 May 2017 13:28:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 394F6160BC7 for ; Thu, 25 May 2017 15:28:22 +0200 (CEST) Received: (qmail 55255 invoked by uid 500); 25 May 2017 13:28:21 -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 55237 invoked by uid 99); 25 May 2017 13:28:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2017 13:28:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 467EDCD5CE for ; Thu, 25 May 2017 13:28:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.12 X-Spam-Level: X-Spam-Status: No, score=-0.12 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cloudsoftcorp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id FMkGjfQ2td24 for ; Thu, 25 May 2017 13:28:16 +0000 (UTC) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 384D05F567 for ; Thu, 25 May 2017 13:28:16 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id 7so91716254wmo.1 for ; Thu, 25 May 2017 06:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=FyKutpueh5lpUkUt+tHvvWzsja2Zkgz/7eT4sUCadAE=; b=W7N8trkUqnatRO8GGCCk0thV3wCv1EKXLOB0Awd7q8dReNDx1LAf1bdM3MHLHo7nx0 wZ/MHSYoc7R2/S4rga0CfajdJbZ/c7N3H3DDNKOHKe9gC1sVORK3v/el0bbkQdk2h70w pud/Otol/iFkBQHbJCeFv8Ab4bIUHMrUdTQMM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=FyKutpueh5lpUkUt+tHvvWzsja2Zkgz/7eT4sUCadAE=; b=rHPReCWvfj4SgRFsI/jMkP+QVsY8j1f65LjgjATrB6pi86t0Bv2NxxVESJXSMgf3ao jdu/dBwYUaafABFA91KkiYg/NZKRl/DbCQOZ2UoC/KKep/5qCLsBl2cbFtutu7hrivEK EumZ/5NR1T2yZJlSG+RjDrsLC4YphezLQmZNs9TeP1SrTcLcmdtJY3smkvW19vliRKIN euJ2YbACnSyrulIks0smIrfRInfR5+DKyML2pFTUR5/WrXMIcPUdVS0GCmNgTeCRrsBw bOkaAXEhfTOm+9bH7La0zSw6Pr2K6VKKRTUpRuIqRcY3FUzpMRoM0gHk5nEg7VRFN/ew b5Xg== X-Gm-Message-State: AODbwcCMyR6nKfT2ZfuTuwHoRYZ4wxKwU6zQMJ8MYbZlPlbR2uK0pAzR vsMWraBmMZvt00eYJkQ+6Rfm92DwwC60AtCe6s+DmmRf/3WvyvfbMJqdSj3jUbSnY31oEw0Un0L 8+A== X-Received: by 10.28.140.74 with SMTP id o71mr10455129wmd.90.1495718895642; Thu, 25 May 2017 06:28:15 -0700 (PDT) Received: from localhost.localdomain ([85.196.172.162]) by smtp.googlemail.com with ESMTPSA id 7sm7459295wrs.69.2017.05.25.06.28.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 May 2017 06:28:15 -0700 (PDT) From: Valentin Aitken X-Google-Original-From: Valentin Aitken Subject: Re: Is nested DSL supported? To: dev@brooklyn.apache.org, Murdo Aird References: Message-ID: <40f3b97e-e4fc-54e7-5381-3d2a565d176d@cloudsoft.io> Date: Thu, 25 May 2017 16:28:13 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Legal-Virus-Advice: Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by Cloudsoft Corporation Limited in this regard and the recipient should carry out such virus and other checks as it considers appropriate. X-Legal-Confidentiality: This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. Cloudsoft Corporation Limited does not accept responsibility for changes made to this message after it was sent. X-Legal-Company-Info: Cloudsoft Corporation Limited. Registered in Scotland. Number: SC349230. Registered Office: 13 Dryden Place, Edinburgh, EH9 1RP. archived-at: Thu, 25 May 2017 13:28:23 -0000 From my experience yes, DSL can be nested. If you get( Config) and the raw value is not from T but a "DSL" value then the DeferredSupplier value will be evaluated. Nested DeferredSupplier are also evaluated if necessary. However if your raw value is a list of "DSL" and you `get(Config>)` then it will not be evaluated. An example [1] [1] https://github.com/cloudsoft/brooklyn-blockstore/pull/28/files#diff-041e352d59c46770a9b973b7f8232ef2R55 On 25/05/17 15:59, Murdo Aird wrote: > Can Brooklyn DSL be nested? > > I want to retrieve a secret from vault using the external provider and the following syntax works: > > $brooklyn:external("vault", "name-of-secret") > > However, the secret I want to retrieve is variable and depends on the way the blueprint is deployed. I, therefore, want to be able to pull the "name-of-secret" from some other config. For example: > > $brooklyn:external("vault", $brooklyn:entity("blah").config("name-of-secret")) > > However that syntax does not work. Any guidance would be appreciated. > > Thanks > Murdo -- Valentin Aitken Software Engineer Cloudsoft Corporation Ltd. www.cloudsoft.io