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 8230E18B12 for ; Tue, 24 Nov 2015 14:43:10 +0000 (UTC) Received: (qmail 14034 invoked by uid 500); 24 Nov 2015 14:43:10 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 13999 invoked by uid 500); 24 Nov 2015 14:43:10 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Delivered-To: moderator for dev@brooklyn.incubator.apache.org Received: (qmail 80491 invoked by uid 99); 24 Nov 2015 14:27:49 -0000 X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cloudsoftcorp.com 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 :content-type; bh=AUPyxwv1VBRhJTrn5xfURpJNV3VeA/XY0LHH9F3V34k=; b=PcX+EldmSwrMSsuN3KbG8UPPcE30j2dQTNUOsbHtjuv0XvQPCVDp6x8sOqSTInxt6P rUaNv2/h1HsJQxwNA2jhBdR8KgmVUwF3hU6vfKgBfDFB9NJWgpJREzzJSkmIfwbsCgCH J2FvS8Mf6fUlXBBn056X71vlNPDA0+ZODGmSc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=AUPyxwv1VBRhJTrn5xfURpJNV3VeA/XY0LHH9F3V34k=; b=Zj4jsLZ/vtau7rwla5bZD/Dj/REV01B/pcdHUamtcn7trJHkScT7+wviFY6x/Kysze jRWX+fT7frctEaAibx+6u2OQnFddw76Y6AEuYaAe07/9/GFn8zDj/NEd4BJiA5q5prIv VjvpGWlN7PVrb/yYdA5ZfQxMRL2eHAx9OjBdfpercUnudHvOK8xyTGrSqYOWwVBN/wBW Wh9lzLh/jvnpd01uw/VDTeLJlTJ5C1gJXbGJRpknPDKR7WLBGHDLCsSozmpNg9u/ItX8 nqx4qa3QAw6Tj8p0wqKwgAWGQlw0rQosFz7HIncnF7InTdSkB8OieFY7pSsju1FCkJC/ jGXA== X-Gm-Message-State: ALoCoQlhM27YHfXuRGzzgksFuYUYxSpjj2qW+RxJL2ovliG+YEYKCYnxnSOysht7ZUri6XlZK3pUCiOSAJYZquqMHb9Y0jZBho7cRdNQvE5/cZ4rGtdA0+k/5bsOzVTiE1qt/VAvkIMOeI7HxuZBKBXrK7UT/BZuEw== X-Received: by 10.140.242.77 with SMTP id n74mr22076655qhc.37.1448375258701; Tue, 24 Nov 2015 06:27:38 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Morgan Wright Date: Tue, 24 Nov 2015 14:27:29 +0000 Message-ID: Subject: Re: Request for comment on a proposal for a Brooklyn CLI To: dev@brooklyn.incubator.apache.org Content-Type: multipart/alternative; boundary=001a1138f50ccbfb6005254a2469 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. --001a1138f50ccbfb6005254a2469 Content-Type: text/plain; charset=UTF-8 +1 for bk On Tue, Nov 24, 2015 at 5:18 AM Andrew Kennedy < andrew.kennedy@cloudsoftcorp.com> wrote: > On Fri, 20 Nov 2015 at 12:14 David Lloyd > wrote: > > +1 Great idea. > > I will read the Google doc proposal in more depth when I have some more > time. But, I have one suggestion that may be useful. > > Some possible commands that the CLI may provide include: > > > > br login > > > > cache login credentials for the Brooklyn instance > > > > This works the way you expect, setting the context to a particular Brooklyn > instance. > > br application cache > > > > cache the application to be used with subsequent commands that > require > > an application ID. > > > > > > br entity cache > > > > cache the entity to be used with subsequent commands that require an > > entity ID (to be discarded if a new application ID is set). > > > > I get the idea behind these 'cache' commands, but they are a little > confusing, and probably not what you expect in a command line, where > commands should generally be idempotent, at least in terms of local state, > and executable at any time, with the usual exception of login if required. > What might be better is to leave the context out and make all CLI commands > fully specified, and therefore repeatable in any context. Then, we could > have a brooklyn 'shell' where there is a context, either global, > application or entity. You would specify commands without the 'br' prefix. > A sample interaction might look like this: > > % brooklyn > br> login http://brooklyn.abstractvisitorpattern.co.uk:8081/ adk > password: hunter2 > br> application list > | ID | NAME | > | abc | clocker | > | def | mesos | > br> application select abc > br:clocker> entity list-children > | ID | NAME | > | ghi | docker-infrastructure | > br:clocker> entity select ghi > br:clocker: docker-infrastructure > entity list-children > | ID | NAME | > | jkl | docker-1 | > | mno | docker-2 | > | pqr | docker-3 | > | stu | calico-sdn | > br:clocker:docker-infrastructure> entity select mno > br:clocker:docker-2> sensor list > | NAME | TYPE | VALUE | > | cpu | Double | 0.25 | > | memory | Long | 8192000000 | > | containers | Integer | 2 | > br:clocker:docker-2> logout > > Note that we are selecting an application context, then an entity context > in the _tree_ of entities, by id. Having an application/entity context > allows us to list current children, and show sensors on the current entity > easily, and the context can be reported in the prompt for feedback. > > WDYT, assuming you aren't planning something like this already? > > Cheers, > Andrew. > > -- > > Andrew Kennedy ; Founder clocker.io project ; @grkvlt ; Cloudsoft > --001a1138f50ccbfb6005254a2469--