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 4C4FC200C3A for ; Fri, 31 Mar 2017 13:11:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 490F7160B8C; Fri, 31 Mar 2017 11:11:23 +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 665B8160B80 for ; Fri, 31 Mar 2017 13:11:22 +0200 (CEST) Received: (qmail 51452 invoked by uid 500); 31 Mar 2017 11:11: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 51440 invoked by uid 99); 31 Mar 2017 11:11:20 -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; Fri, 31 Mar 2017 11:11:20 +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 484431A01BD for ; Fri, 31 Mar 2017 11:11:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.397 X-Spam-Level: X-Spam-Status: No, score=-2.397 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_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] 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 nYGOPHEfh2t1 for ; Fri, 31 Mar 2017 11:11:18 +0000 (UTC) Received: from mail-wr0-f176.google.com (mail-wr0-f176.google.com [209.85.128.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 107A25F177 for ; Fri, 31 Mar 2017 11:11:18 +0000 (UTC) Received: by mail-wr0-f176.google.com with SMTP id w43so100739854wrb.0 for ; Fri, 31 Mar 2017 04:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=/caFCukqRWG+KNgwQW4TBb6Xkj259iiojN0TVTXFI1M=; b=LKXb4sNevlksLPOA1S8d6zR4MjUhhIOcX2iDLwKUahv45xKXw19N0pYECjsqwF0prE FlYOldg9+ZMjwNU0fcrfclyxSVxtNxAJl6mgCWStFbfq4XD3vM4lmSYdl93S4l6PKYCE C6X4INXr+1N150bd8Kqz7fZce24ojVee9GGHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=/caFCukqRWG+KNgwQW4TBb6Xkj259iiojN0TVTXFI1M=; b=KXDOyYWbrC/zGrmUMWlcBDrCwNaLSWxChIuBYPALeRo8kJIK7D4RlIVnMD0SOEYrRZ hXsWLpAQXKZVcYtLUWfwqakbB4+8K+Fz6+qQCMeuUgrn/E8nT/cYsH7nRGdSusQCNj5F OdkEiFXOtVnb19MWC81pzJu2g8pze792WAJhN8ptyFY0RTqv5a4lrsP3jIbnlJZU2Q5l 7V7NrIWPcD2MT7EOj6jgDIEz4D+l/i2W78k/k/u4HYuIOYxaAM+xL1rh6I5hq8+dLzCM zyOOKcicyH6wtNIsYspIZ1R5jwt+XfQ8Rzx/i4o1N83b8HPhBaacpFlADm9U3xlz2O9T M4mQ== X-Gm-Message-State: AFeK/H02rEvy6YjWP0UpTuqp+IpKtHXJ5PqGEsqF49+DJ44exTLNVXQw6F5QGyiAsGB1QUk7MDHnQraiasT2sWXXE++fyzrCI8nfEHKUM1GXmO0QCP97M2+SBmwl0sBwmkH4uA== X-Received: by 10.28.220.212 with SMTP id t203mr2349044wmg.62.1490958676674; Fri, 31 Mar 2017 04:11:16 -0700 (PDT) Received: from [192.168.0.102] (77-85-249-133.ip.btc-net.bg. [77.85.249.133]) by smtp.gmail.com with ESMTPSA id x103sm5396078wrb.5.2017.03.31.04.11.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Mar 2017 04:11:16 -0700 (PDT) From: Svetoslav Neykov Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: [PROPOSAL] BROOKLYN-460 Brooklyn Camp syntax for adding tags to an entity spec Date: Fri, 31 Mar 2017 14:11:14 +0300 References: <07be005d-ab28-a77e-058b-44265cb428ec@cloudsoft.io> To: dev@brooklyn.apache.org In-Reply-To: <07be005d-ab28-a77e-058b-44265cb428ec@cloudsoft.io> Message-Id: X-Mailer: Apple Mail (2.3259) 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: Fri, 31 Mar 2017 11:11:23 -0000 I think we should support arbitrary objects for tags. Users should use = only tags they understand, so it's fine to have free-form tags in there. The problem with tag objects in YAML is that we can't use DSL - because = the tags need to be resolved pretty early, while constructing the = EntitySpec when there are no running entities. So = Futures/Tasks/DeferredSuppliers should not be allowed for tag values. On the other hand YAML lists, maps could be useful. Svet. > On 31.03.2017 =D0=B3., at 11:49, Valentin Aitken = wrote: >=20 > Hi, >=20 > I'd like to bring attention to a new feature I suggested in = BROOKLYN-460 [1] and [2]. > Current requirement is to be able to supply String tags in an entity = spec in YAML so it can be then retrieved via REST API with GET = /v1/applications//entities//tags. >=20 > Example usage in a YAML blueprint: > services: > - type: = org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess > brooklyn.tags: > - tag1 > - "2" > - hello world >=20 > Please shout if you have further requirements for brooklyn.tags. >=20 > Main concern raised in [2] comments is whether that syntax should = support any Object as a tag. >=20 > My concern is that although Object is allowed > in Apache Brooklyn only classes defined in = org.apache.brooklyn.core.mgmt.BrooklynTags are used as a tag. > Every entity has this tag at the moment: > [{"kind":"yaml_spec","contents":"services:\n- type......"}] >=20 > That is good since REST query for tags in every entity will have = "kind" field which someone can rely on. > Good use case is to very easy filter out kind -> yaml_spec and making = sure user can retrieve only tags assigned in YAML. > That's why I decided to follow the same pattern and in YAML and accept > string values only which are then passed to = org.apache.brooklyn.core.mgmt.BrooklynTags.newNotesTag > in order to keep existing pattern with "kind" and "contents" fields = for every tag. >=20 >=20 > [1] https://issues.apache.org/jira/browse/BROOKLYN-460 > [2] https://github.com/apache/brooklyn-server/pull/612 >=20 > --=20 > Valentin Aitken > Software Engineer > Cloudsoft Corporation Ltd. > www.cloudsoft.io >=20