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 EC5B6200C3F for ; Wed, 22 Mar 2017 20:29:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EAD9F160B86; Wed, 22 Mar 2017 19:29:59 +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 3F335160B74 for ; Wed, 22 Mar 2017 20:29:59 +0100 (CET) Received: (qmail 5392 invoked by uid 500); 22 Mar 2017 19:29:58 -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 5380 invoked by uid 99); 22 Mar 2017 19:29:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Mar 2017 19:29:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4D2D71A02B6 for ; Wed, 22 Mar 2017 19:29:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.899 X-Spam-Level: * X-Spam-Status: No, score=1.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, T_REMOTE_IMAGE=0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cloudsoftcorp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0bHvHGOuQ-s5 for ; Wed, 22 Mar 2017 19:29:55 +0000 (UTC) Received: from mail-vk0-f45.google.com (mail-vk0-f45.google.com [209.85.213.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9F73F5FCD3 for ; Wed, 22 Mar 2017 19:29:55 +0000 (UTC) Received: by mail-vk0-f45.google.com with SMTP id d188so133722113vka.0 for ; Wed, 22 Mar 2017 12:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=62++wUOIJhUdStB399B1clYjWSWy9sCkG1r9X2bdlRQ=; b=CBzto82bArVEgT9ZNCsVafb6oM9P1tpn5KNjJSOk2479oP/iPOGCC/9s3Dc5NYxGA4 AmyDbrmjpRpTAC7zUP9elvG2KVbx9GTDsxbXwj+PRJSQdhB4xiA9CS9q+PE32L7Hboaw Fvk9Dti9Xu0mXWsNdLwyGcCdndGKDDL6bC/RU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=62++wUOIJhUdStB399B1clYjWSWy9sCkG1r9X2bdlRQ=; b=cFSlvyZL6kV1KMHn4NlxZ4gabcuonRw4nJ1JcDu9yGYUS8rceKxMsqkGmGtruKRTIV 0GNOdPtIQ2hFf67aUBhsIglq0RB07dA//CNfI+6AsDcWLdhwrHDBtbsQLsC0RdF4jKEL ayDpMUb6BRxvMqwxBK3WyZF6yD+ApxTbBUK9F1ar8S6MAo+i9ynGyn3clcPQC9xruL9p gS7FS83bhce6wXnZZD+ebXnLK5F567ikAAhyB5+3clHlgwsDDOdRAYEtcHaleLH9gpxC 17pw4AOlVUTjanfEFm6zyLB4YOmNrFNPj+Gkd3cdg9DKgnrsk04k78Ll1Hif/rH4zrHZ /f5Q== X-Gm-Message-State: AFeK/H0kD7QuUp6pbRk7SZ59dLHqmk7VreDY/r40eHsXb8B0UyWu1ESpCAG4jw02B/xcYjAzWqrIoynIVVw/kotfEOrRxtMgP8jDjyUFtzdxphYsMHX3g1/yuB6Gh6mxl0zsk05ZxHHrdrFK3FADeA== X-Received: by 10.31.252.202 with SMTP id a193mr14982480vki.169.1490210643028; Wed, 22 Mar 2017 12:24:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mike Zaccardo Date: Wed, 22 Mar 2017 19:23:52 +0000 Message-ID: Subject: Re: Trouble with YAML Transformer To: Brooklyn dev Content-Type: multipart/alternative; boundary=94eb2c149af804da0c054b56b437 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: Wed, 22 Mar 2017 19:30:00 -0000 --94eb2c149af804da0c054b56b437 Content-Type: text/plain; charset=UTF-8 Hi Graham, In your `enricher.targetValue` -- `$brooklyn.sensor` should be `$brooklyn:sensor` (the dot replaced by a colon). If that does not solve it, try providing the `enricher.targetValue` with string, like so: brooklyn.enrichers: - type: org.apache.brooklyn.enricher.stock.Transformer brooklyn.config: enricher.sourceSensor: $brooklyn:sensor("cluster.first.entity") enricher.targetSensor: $brooklyn:sensor("cluster_first_host") enricher.targetValue: $brooklyn:formatString: - "%s" - $brooklyn:sensor("org.apache.brooklyn.api.entity.Entity", "cluster.first.entity").attributeWhenReady(" host.name") I hope this helps. Cheers, Mike On Wed, Mar 22, 2017 at 12:10 PM Graham Ashby wrote: What I want is an attribute that I can include in a template. I'm trying to get the host.name of the first entity in the cluster, so what I've got is: brooklyn.enrichers: - type: org.apache.brooklyn.enricher.stock.Transformer brooklyn.config: enricher.sourceSensor: $brooklyn:sensor("cluster.first.entity") enricher.targetSensor: $brooklyn:sensor("cluster_first_host") enricher.targetValue: $brooklyn.sensor("org.apache.brooklyn.api.entity.Entity", "cluster.first.entity").attributeWhenReady("host.name") But I get the literal value "$brooklyn.sensor("org.apache.brooklyn.api.entity.Entity", "cluster.first.entity").attributeWhenReady("host.name")" So, what am I doing wrong? Thanks Graham -- Mike Zaccardo Senior Software Engineer Skype: mike.cloudsoft Twitter: @ItsMeMikeZ LinkedIn: linkedin.com/in/mike-zaccardo [image: Cloudsoft Logo.jpg] Stay up to date with everything Cloudsoft: [image: Twitter_Logo_White_On_Blue.png] [image: YouTube-social-icon_red_48px.png] --94eb2c149af804da0c054b56b437--