brooklyn-client.git
16 months agoAdds CatalogApi test using equivalent non deprecated method 85/head
Andrew Donald Kennedy [Thu, 11 Feb 2021 10:47:43 +0000 (10:47 +0000)] 
Adds CatalogApi test using equivalent non deprecated method

Signed-off-by: Andrew Donald Kennedy <andrew.kennedy@cloudsoftcorp.com>
23 months agoThis closes #84
Alex Heneveld [Wed, 22 Jul 2020 12:14:28 +0000 (13:14 +0100)] 
This closes #84

2 years agoupdated LICENSE, NOTICE, DEPENDENCIES 84/head
Alex Heneveld [Tue, 2 Jun 2020 09:05:35 +0000 (10:05 +0100)] 
updated LICENSE, NOTICE, DEPENDENCIES

2 years agofeature poms include the dependencies the feature uses
Alex Heneveld [Tue, 2 Jun 2020 08:39:39 +0000 (09:39 +0100)] 
feature poms include the dependencies the feature uses

    and tidy versions and exclusions for maven/osgi consistency

2 years agoSet version to 1.1.0-SNAPSHOT
Richard Downer [Mon, 2 Mar 2020 17:13:17 +0000 (17:13 +0000)] 
Set version to 1.1.0-SNAPSHOT

2 years agoMerge pull request #82 from nakomis/notice-update
Thomas Bouron [Wed, 8 Jan 2020 15:08:09 +0000 (15:08 +0000)] 
Merge pull request #82 from nakomis/notice-update

Updates NOTICE files

2 years agoUpdates NOTICE files 82/head
Martin Harris [Wed, 8 Jan 2020 13:59:26 +0000 (13:59 +0000)] 
Updates NOTICE files

2 years agoThis closes #81
Alex Heneveld [Fri, 20 Dec 2019 16:29:39 +0000 (16:29 +0000)] 
This closes #81

2 years agoUpdate Jenkinsfile to: 81/head
Thomas Bouron [Mon, 16 Dec 2019 11:57:02 +0000 (11:57 +0000)] 
Update Jenkinsfile to:
- add the pipeline trigger on comment only if we are building a PR
- not deploy artifacts when building master. This will be taken care of during the full brooklyn build on master (see Jenkinsfile configuration at the brooklyn root)

2 years agoMerge pull request #80 from tbouron/feature/jenkins
Thomas Bouron [Thu, 5 Dec 2019 10:50:42 +0000 (10:50 +0000)] 
Merge pull request #80 from tbouron/feature/jenkins

Reuse local maven cache + add PR comment trigger

2 years agoReuse local maven cache + add PR comment trigger 80/head
Thomas Bouron [Thu, 5 Dec 2019 10:27:55 +0000 (10:27 +0000)] 
Reuse local maven cache + add PR comment trigger

2 years agoMerge pull request #79 from tbouron/master
Thomas Bouron [Wed, 4 Dec 2019 15:24:04 +0000 (15:24 +0000)] 
Merge pull request #79 from tbouron/master

Add jenkinsfile for multibranch job on Jenkins

2 years agoAdd jenkinsfile for multibranch job on Jenkins 79/head
Thomas Bouron [Tue, 3 Dec 2019 11:26:21 +0000 (11:26 +0000)] 
Add jenkinsfile for multibranch job on Jenkins

2 years agoMerge pull request #78 from geomacy/jsonpath-update
Duncan Grant [Thu, 19 Sep 2019 14:11:55 +0000 (15:11 +0100)] 
Merge pull request #78 from geomacy/jsonpath-update

BROOKLYN-586 update br to replace obsolete jsonpath package

2 years agodo a little more test and make sure to run unit tests during build 78/head
Geoff Macartney [Wed, 11 Sep 2019 21:15:49 +0000 (22:15 +0100)] 
do a little more test and make sure to run unit tests during build

2 years agotry matryer/is instead of testify
Geoff Macartney [Wed, 4 Sep 2019 22:12:20 +0000 (23:12 +0100)] 
try matryer/is instead of testify

looks nice

2 years agotidy error handling and variable naming
Geoff Macartney [Wed, 4 Sep 2019 21:43:27 +0000 (22:43 +0100)] 
tidy error handling and variable naming

2 years agofix a couple of error returns in (currently unused) functions
Geoff Macartney [Wed, 4 Sep 2019 21:19:39 +0000 (22:19 +0100)] 
fix a couple of error returns in (currently unused) functions

2 years agouse path.Join instead of Sprintf
Geoff Macartney [Wed, 4 Sep 2019 21:09:13 +0000 (22:09 +0100)] 
use path.Join instead of Sprintf

2 years agoRemove some duplication in test code
Geoff Macartney [Tue, 3 Sep 2019 20:43:10 +0000 (21:43 +0100)] 
Remove some duplication in test code

2 years agoavoid warnings
Geoff Macartney [Wed, 7 Aug 2019 22:36:27 +0000 (23:36 +0100)] 
avoid warnings

2 years agoupdate notice files with new package
Geoff Macartney [Tue, 13 Aug 2019 22:03:25 +0000 (23:03 +0100)] 
update notice files with new package

2 years agoecho Go version in build.sh
Geoff Macartney [Tue, 13 Aug 2019 21:43:46 +0000 (22:43 +0100)] 
echo Go version in build.sh

2 years agoswitch to using Kubernetes jsonpath package
Geoff Macartney [Mon, 12 Aug 2019 22:48:36 +0000 (23:48 +0100)] 
switch to using Kubernetes jsonpath package

2 years agoadd tests for Display
Geoff Macartney [Tue, 6 Aug 2019 21:13:31 +0000 (22:13 +0100)] 
add tests for Display

3 years agoMerge pull request #77 from jcabrerizo/feature/multiHeaders
Geoff Macartney [Fri, 31 May 2019 22:16:06 +0000 (23:16 +0100)] 
Merge pull request #77 from jcabrerizo/feature/multiHeaders

Allow sent user defined headers and omit credentials if not needed

3 years agoremoved second reading of 'authorizationParam' 77/head
Juan Cabrerizo [Fri, 31 May 2019 10:22:10 +0000 (11:22 +0100)] 
removed second reading of 'authorizationParam'

3 years agoremove cedentials output
Juan Cabrerizo [Fri, 31 May 2019 10:02:59 +0000 (11:02 +0100)] 
remove cedentials output

3 years agoformating files with gofmt
Juan Cabrerizo [Fri, 31 May 2019 09:50:43 +0000 (10:50 +0100)] 
formating files with gofmt

3 years agocleared authorization param manage
Juan Cabrerizo [Fri, 31 May 2019 09:45:37 +0000 (10:45 +0100)] 
cleared authorization param manage

3 years agounitary test
Juan Cabrerizo [Mon, 27 May 2019 15:59:24 +0000 (16:59 +0100)] 
unitary test

3 years agochanged open header params for authorization. Networks now manages credentials instea...
Juan Cabrerizo [Mon, 27 May 2019 15:58:57 +0000 (16:58 +0100)] 
changed open header params for authorization. Networks now manages credentials instead of user:pass

3 years agoadded headers format
Juan Cabrerizo [Fri, 24 May 2019 09:25:58 +0000 (10:25 +0100)] 
added headers format

3 years agoadded default behaviour if not credentialsRequired param is found
Juan Cabrerizo [Fri, 24 May 2019 08:56:55 +0000 (09:56 +0100)] 
added default behaviour if not credentialsRequired param is found

3 years agotest for headers and noCredential params
Juan Cabrerizo [Thu, 23 May 2019 15:48:04 +0000 (16:48 +0100)] 
test for headers and noCredential params

3 years agoremoved dev-outputs
Juan Cabrerizo [Thu, 23 May 2019 12:35:10 +0000 (13:35 +0100)] 
removed dev-outputs

3 years agoheaders and noCredentials as global
Juan Cabrerizo [Thu, 23 May 2019 10:39:25 +0000 (11:39 +0100)] 
headers and noCredentials as global

3 years agoupdated license files for new deps
Alex Heneveld [Thu, 31 Jan 2019 12:09:46 +0000 (12:09 +0000)] 
updated license files for new deps

3 years agoThis closes #76
Alex Heneveld [Wed, 16 Jan 2019 02:12:49 +0000 (02:12 +0000)] 
This closes #76

3 years agobump resteasy to be compatible with new jersey 76/head
Alex Heneveld [Wed, 16 Jan 2019 01:26:08 +0000 (01:26 +0000)] 
bump resteasy to be compatible with new jersey

fix need for csrf header now that that is respected in tests

3 years agoThis closes #72
Thomas Bouron [Tue, 20 Nov 2018 09:20:40 +0000 (09:20 +0000)] 
This closes #72

3 years agoSwitch to dep for dependency management 72/head
Geoff Macartney [Sat, 17 Nov 2018 22:49:20 +0000 (22:49 +0000)] 
Switch to dep for dependency management

3 years agoThis closes #71
Thomas Bouron [Wed, 31 Oct 2018 15:53:48 +0000 (15:53 +0000)] 
This closes #71

3 years agoFix for SUREFIRE-1588 71/head
Paul Campbell [Wed, 31 Oct 2018 15:11:52 +0000 (15:11 +0000)] 
Fix for SUREFIRE-1588

Latest version of Java 1.8.0_191 enforces that Manifest classpath entries be
relative.

https://issues.apache.org/jira/browse/SUREFIRE-1588

3 years agoThis closes #70
Aled Sage [Sat, 29 Sep 2018 09:38:08 +0000 (10:38 +0100)] 
This closes #70

3 years agofix jenkins docker build 70/head
frogfather [Fri, 28 Sep 2018 11:13:05 +0000 (12:13 +0100)] 
fix jenkins docker build
Jenkins build failed writing to /var/maven/.brooklyn

3 years agoCloses #69
Geoff Macartney [Wed, 18 Jul 2018 15:20:14 +0000 (16:20 +0100)] 
Closes #69

updated LICENSE and NOTICE, using new procedure

Supporting changes for https://github.com/apache/brooklyn-dist/pull/123

4 years agoupdated LICENSE and NOTICE, using new procedure 69/head
Alex Heneveld [Tue, 26 Jun 2018 12:46:00 +0000 (13:46 +0100)] 
updated LICENSE and NOTICE, using new procedure

4 years agoCloses #68
Geoff Macartney [Fri, 23 Mar 2018 13:50:16 +0000 (13:50 +0000)] 
Closes #68

Temporarily use fork of NodePrime repo

See https://lists.apache.org/thread.html/10a74756dbeb1243928eb87c379b01ba58357a6204149d98676fa025@%3Cdev.brooklyn.apache.org%3E

Until this is resolved we can use John's fork

4 years agoAdd vendor file and remove glide from build/readme 68/head
Geoff Macartney [Fri, 23 Mar 2018 12:59:45 +0000 (12:59 +0000)] 
Add vendor file and remove glide from build/readme

4 years agoTemporarily use fork of NodePrime repo
Geoff Macartney [Fri, 23 Mar 2018 12:40:43 +0000 (12:40 +0000)] 
Temporarily use fork of NodePrime repo

See https://lists.apache.org/thread.html/10a74756dbeb1243928eb87c379b01ba58357a6204149d98676fa025@%3Cdev.brooklyn.apache.org%3E

Until this is resolved we can use John's fork

4 years agoCloses #67
Geoff Macartney [Fri, 2 Feb 2018 19:00:31 +0000 (19:00 +0000)] 
Closes #67

Invoke effector: support timeout

Passes the timeout arg (if supplied) when making the REST api call to Brooklyn. The response from this is written to stdout.

If it times out, the REST api still gives back a 202 response code with a json payload describing the executing task. The `br` tool simply writes that to stdout. For example:

```
cli/target/bin/darwin.amd64/br app rbfvau9i75 effector stop invoke --timeout 1ms

{"id":"kpML04c1","displayName":"stop","description":"Invoking effector stop on server @ localhost with parameters {}","entityId":"rbfvau9i75","entityDisplayName":"server @ localhost","tags":["EFFECTOR",{"entityId":"rbfvau9i75","effectorName":"stop"},{"entitlementContext":{"user":"<snip>","sourceIp":"0:0:0:0:0:0:0:1","requestUri":"/v1/applications/rbfvau9i75/entities/rbfvau9i75/effectors/stop","requestUniqueIdentifier":"rjuSuB"}},{"type":"org.apache.brooklyn.api.mgmt.ManagementContext"},{"wrappingType":"targetEntity","entity":{"type":"org.apache.brooklyn.api.entity.Entity","id":"rbfvau9i75"}},{"entitlementContext":{"user":"<snip>","sourceIp":"0:0:0:0:0:0:0:1","requestUri":"/v1/applications/rbfvau9i75/entities/rbfvau9i75/effectors/stop","requestUniqueIdentifier":"rjuSuB"}},{"wrappingType":"contextEntity","entity":{"type":"org.apache.brooklyn.api.entity.Entity","id":"rbfvau9i75"}}],"submitTimeUtc":1517490162402,"startTimeUtc":1517490162402,"endTimeUtc":null,"currentStatus":"In progress","result":null,"isError":false,"isCancelled":false,"children":[{"link":"/v1/activities/X9j8xcJ1","metadata":{"id":"X9j8xcJ1","taskName":"invoking stop[] on 1 node","entityId":"rbfvau9i75","entityDisplayName":"server @ localhost"}}],"submittedByTask":null,"blockingTask":{"link":"/v1/activities/X9j8xcJ1","metadata":{"id":"X9j8xcJ1","taskName":"invoking stop[] on 1 node","entityId":"rbfvau9i75","entityDisplayName":"server @ localhost"}},"detailedStatus":"Waiting on Task[invoking stop[] on 1 node]@X9j8xcJ1\n\nTask[stop]@kpML04c1\nChildren:\n  Task[invoking stop[] on 1 node]@X9j8xcJ1: Executing 1 child task\n\nIn progress, thread waiting (notify) on java.util.concurrent.FutureTask@61fe3136\nAt: com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)\n    org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:384)\n    org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:393)\n    org.apache.brooklyn.util.core.task.DynamicTasks$TaskQueueingResult.andWaitForSuccess(DynamicTasks.java:195)\n    org.apache.brooklyn.util.core.task.DynamicTasks.get(DynamicTasks.java:363)\n    org.apache.brooklyn.core.entity.trait.StartableMethods.stop(StartableMethods.java:58)\n    org.apache.brooklyn.core.entity.AbstractApplication.doStop(AbstractApplication.java:271)\n    org.apache.brooklyn.core.entity.AbstractApplication.stop(AbstractApplication.java:246)\n    org.apache.brooklyn.util.javalang.Reflections.invokeMethodFromArgs(Reflections.java:984)\n    org.apache.brooklyn.util.javalang.Reflections.invokeMethodFromArgs(Reflections.java:871)\n    org.apache.brooklyn.util.javalang.Reflections.invokeMethodFromArgs(Reflections.java:857)\n    org.apache.brooklyn.util.javalang.Reflections.invokeMethodFromArgs(Reflections.java:852)\n    org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodLocal(AbstractManagementContext.java:327)\n    org.apache.brooklyn.core.mgmt.internal.AbstractManagementContext.invokeEffectorMethodSync(AbstractManagementContext.java:366)\n    org.apache.brooklyn.core.mgmt.internal.EffectorUtils.invokeMethodEffector(EffectorUtils.java:274)\n    org.apache.brooklyn.core.effector.MethodEffector.call(MethodEffector.java:153)\n    org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:68)\n    org.apache.brooklyn.core.entity.trait.Startable$StopEffectorBody.call(Startable.java:60)\n    org.apache.brooklyn.core.effector.EffectorTasks$EffectorBodyTaskFactory$1.call(EffectorTasks.java:82)\n    org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:364)\n    org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:565)","streams":{},"links":{"self":"/v1/activities/kpML04c1","children":"/v1/activities/kpML04c1/children","entity":"/v1/applications/rbfvau9i75/entities/rbfvau9i75"}}
```

4 years agoInvoke effector: support timeout 67/head
Aled Sage [Fri, 2 Feb 2018 08:56:49 +0000 (08:56 +0000)] 
Invoke effector: support timeout

4 years agoThis closes #66
Duncan Godwin [Thu, 11 Jan 2018 14:02:15 +0000 (14:02 +0000)] 
This closes #66

4 years ago`br` on Windows generates incorrect ZIP archives 66/head
Richard Downer [Thu, 11 Jan 2018 11:11:08 +0000 (11:11 +0000)] 
`br` on Windows generates incorrect ZIP archives

The ZIP archive should use / internally but when on Windows `br` used
\ instead. This affects the `br catalog add` command when given a
directory.

4 years agobr catalog add: Fix path parsing errors on Windows
Richard Downer [Thu, 11 Jan 2018 11:36:24 +0000 (11:36 +0000)] 
br catalog add: Fix path parsing errors on Windows

br has trouble working with files on Windows due to its attempt to
coerce filenames to file: URLs, which are ill-defined and unreliable
when it comes to backslashes and drive letters. Code revised to handle
files as files instead of URLs to avoid a number of issues.

4 years agoThis closes #65
Duncan Godwin [Tue, 21 Nov 2017 11:46:39 +0000 (11:46 +0000)] 
This closes #65

4 years agoAdd dockerfile for CI build 65/head
Thomas Bouron [Wed, 18 Oct 2017 08:30:28 +0000 (09:30 +0100)] 
Add dockerfile for CI build

4 years agoThis closes #64
Thomas Bouron [Fri, 10 Nov 2017 09:29:32 +0000 (09:29 +0000)] 
This closes #64

4 years agoDefault login port to 80/443 if not supplied 64/head
Geoff Macartney [Thu, 9 Nov 2017 22:15:01 +0000 (22:15 +0000)] 
Default login port to 80/443 if not supplied

4 years agoCloses #63
Geoff Macartney [Thu, 9 Nov 2017 10:22:42 +0000 (10:22 +0000)] 
Closes #63

Fixes index out of range issue

Wasn't handling calls where there were only flag params e.g.
br -v

4 years agoFixes index out of range issue 63/head
Duncan Grant [Wed, 8 Nov 2017 21:49:08 +0000 (21:49 +0000)] 
Fixes index out of range issue

Wasn't handling calls where there were only flag params e.g.
br -v

4 years agoThis closes #61
Thomas Bouron [Wed, 18 Oct 2017 08:30:28 +0000 (09:30 +0100)] 
This closes #61

4 years agoDelete old deprecated code 61/head
Aled Sage [Tue, 10 Oct 2017 08:08:19 +0000 (09:08 +0100)] 
Delete old deprecated code

4 years agoChange version to 1.0.0-SNAPSHOT
Duncan Godwin [Fri, 6 Oct 2017 13:21:50 +0000 (13:21 +0000)] 
Change version to 1.0.0-SNAPSHOT

4 years agoThis closes #60
Duncan Godwin [Mon, 2 Oct 2017 15:28:26 +0000 (16:28 +0100)] 
This closes #60

4 years agoFix tests tearDown (to always stop management context) 60/head
Aled Sage [Thu, 21 Sep 2017 08:19:18 +0000 (09:19 +0100)] 
Fix tests tearDown (to always stop management context)

4 years agoChange version to 0.13.0-SNAPSHOT
Duncan Godwin [Mon, 18 Sep 2017 15:13:19 +0000 (15:13 +0000)] 
Change version to 0.13.0-SNAPSHOT

4 years agoCloses #59
Geoff Macartney [Fri, 28 Jul 2017 14:41:16 +0000 (15:41 +0100)] 
Closes #59

Move Resteasy dependency management to java module pom

4 years agoCloses #58
Geoff Macartney [Fri, 28 Jul 2017 14:30:10 +0000 (15:30 +0100)] 
Closes #58

Fix handling of global flags in scope definition

Previously the presence of global flags in a command like `br --flag app a ent b sensor c` caused the CLI to run the command for app, not sensor.

4 years agoCloses #57
Geoff Macartney [Fri, 28 Jul 2017 14:18:17 +0000 (15:18 +0100)] 
Closes #57

Add flags for verbose output of HTTP request data

New global flags `--verbose` and `--vverbose` (very verbose) configure the network library to write data about API requests to stderr. (I would have used `-v` and `-vv` but the former is already taken as shorthand for `--version`.)

The intention is to make it easier to debug both the working of the CLI and unexpected responses from Brooklyn servers.

Example:
```
$ ./bin/br --verbose deploy ./bp.yaml
POST /v1/applications HTTP/1.1
Host: localhost:8081
User-Agent: Go-http-client/1.1
Content-Length: 0
Authorization: ******
Content-Type: application/json
Accept-Encoding: gzip

HTTP/1.1 201 Created
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store
Content-Type: application/json
Date: Thu, 27 Jul 2017 14:12:56 GMT
Expires: 0
Location: http://localhost:8081/v1/applications/sr9uw9bdbu
Pragma: no-cache
Server: Jetty(9.2.13.v20150730)
Vary: Accept-Encoding

Id:       | sr9uw9bdbu
Name:     | Application (sr9uw9bdbu)
Status:   | In progress
```

```
$ ./bin/br --vverbose application vhkhp6nbbl entity
GET /v1/applications/vhkhp6nbbl/entities HTTP/1.1
Host: localhost:8081
User-Agent: Go-http-client/1.1
Accept: application/json, text/plain
Authorization: ******
Accept-Encoding: gzip

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store
Content-Type: application/json
Date: Thu, 27 Jul 2017 14:16:43 GMT
Expires: 0
Pragma: no-cache
Server: Jetty(9.2.13.v20150730)
Vary: Accept-Encoding

503
[{"id":"tqj1a2g883","name":"Tomcat 7 Server","type":"org.apache.brooklyn.entity.webapp.tomcat.TomcatServer","catalogItemId":"org.apache.brooklyn.entity.webapp.tomcat.TomcatServer:0.12.0-SNAPSHOT","links":{"self":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883","parent":"/v1/applications/vhkhp6nbbl/entities/vhkhp6nbbl","application":"/v1/applications/vhkhp6nbbl","children":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/children","config":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/config","sensors":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/sensors","effectors":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/effectors","policies":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/policies","activities":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/activities","locations":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/locations","tags":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/tags","expunge":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/expunge","rename":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/name","spec":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/spec","iconUrl":"/v1/applications/vhkhp6nbbl/entities/tqj1a2g883/icon","catalog":"/v1/catalog/entities/org.apache.brooklyn.entity.webapp.tomcat.TomcatServer/0.12.0-SNAPSHOT"}}]
0

Id           | Name              | Type
tqj1a2g883   | Tomcat 7 Server   | org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
```

The Authorization header is redacted.

4 years agoMove Resteasy dependency management to java module pom 59/head
Sam Corbett [Fri, 28 Jul 2017 11:53:17 +0000 (12:53 +0100)] 
Move Resteasy dependency management to java module pom

4 years agoAdd flags for verbose output of HTTP request data 57/head
Sam Corbett [Fri, 28 Jul 2017 09:45:27 +0000 (10:45 +0100)] 
Add flags for verbose output of HTTP request data

4 years agoCloses #56
Geoff Macartney [Thu, 27 Jul 2017 17:15:03 +0000 (18:15 +0100)] 
Closes #56

Set ContentType header when adding .yaml and .bom files to the catalog

Using application/x-yaml saves the Brooklyn server the hassle of guessing. At the moment it's too smart for its own good and gives useless errors about zipfiles when there are errors in yaml files, e.g. when trying to add yaml containing an undefined alias.

Before:
```
$ br catalog add mybp.bom
Server error (400): Bundle BasicManagedBundle{symbolicName=null, version=null, url=n
ull} failed preparation: Unable to read /tmp/brooklyn-bundle-transient-null-86366849
75390229868.zip when looking for manifest: ZipException: error in opening zip file
```
After:
```
$ br catalog add mybp.bom
Server error (400): ComposerException: found undefined alias doesntexist
 in 'reader', line 23, column 15:
            name: *doesntexist
```
I'll look to improve the feedback from Brooklyn's guessing endpoint too.

4 years agoFix handling of global flags in scope definition 58/head
Sam Corbett [Thu, 27 Jul 2017 13:58:11 +0000 (14:58 +0100)] 
Fix handling of global flags in scope definition

Previously the presence of global flags in a command like
"br --flag app a ent b sensor c" caused the CLI to run the command for
app, not sensor.

4 years agoSet ContentType when adding .yaml and .bom files to the catalog 56/head
Sam Corbett [Wed, 19 Jul 2017 15:11:14 +0000 (16:11 +0100)] 
Set ContentType when adding .yaml and .bom files to the catalog

Using application/x-yaml saves the Brooklyn server the hassle of
guessing. At the moment it's too smart for its own good and gives
useless errors about zipfiles when there are errors in yaml files.

4 years agoThis closes #42
Sam Corbett [Mon, 17 Jul 2017 12:03:05 +0000 (13:03 +0100)] 
This closes #42

Improve login handling.

4 years agoEnsure logout does not prevent help being displayed 42/head
Geoff Macartney [Thu, 13 Jul 2017 16:07:32 +0000 (17:07 +0100)] 
Ensure logout does not prevent help being displayed

4 years agoAdd licence header to config_test.go
Geoff Macartney [Tue, 4 Jul 2017 15:08:35 +0000 (16:08 +0100)] 
Add licence header to config_test.go

4 years agoAllow login without user/password if target already in config
Geoff Macartney [Tue, 4 Jul 2017 15:01:46 +0000 (16:01 +0100)] 
Allow login without user/password if target already in config

4 years agoRevert to keeping multiple credentials in the config file
Geoff Macartney [Tue, 4 Jul 2017 13:20:46 +0000 (14:20 +0100)] 
Revert to keeping multiple credentials in the config file

per https://github.com/apache/brooklyn-client/pull/42#issuecomment-303995483

4 years agoIgnore invalid config during login and remove config upon failure
Geoff Macartney [Wed, 24 May 2017 19:43:08 +0000 (20:43 +0100)] 
Ignore invalid config during login and remove config upon failure

4 years agoImprove error message when not logged in.
Geoff Macartney [Wed, 24 May 2017 15:13:42 +0000 (16:13 +0100)] 
Improve error message when not logged in.

4 years agoAdd a br server command.
Geoff Macartney [Wed, 24 May 2017 14:15:25 +0000 (15:15 +0100)] 
Add a br server command.

Displays the URL of the connected Brooklyn.

4 years agoSimply the format even more: encode username and password
Geoff Macartney [Wed, 24 May 2017 13:19:10 +0000 (14:19 +0100)] 
Simply the format even more: encode username and password

4 years agoRename method to private
Geoff Macartney [Wed, 24 May 2017 11:51:46 +0000 (12:51 +0100)] 
Rename method to private

4 years agobase64 encode passwords and simplify .brooklyn_cli structure
Geoff Macartney [Wed, 24 May 2017 11:49:56 +0000 (12:49 +0100)] 
base64 encode passwords and simplify .brooklyn_cli structure

Includes support for old style .brooklyn_cli format such that it will
read credentials from the old style and use them, but overwrite with
the new style on next login.

New style looks like:
{
  "credentials": {
    "password": "cGFzc3dvcmQ=",
    "username": "geoff"
  },
  "skipSslChecks": false,
  "target": "http://geoffs-macbook-pro.local:8081"
}

4 years agoAdd logout command
Geoff Macartney [Tue, 23 May 2017 18:34:23 +0000 (19:34 +0100)] 
Add logout command

4 years agoDon't store all old logins in .brooklyn_cli
Geoff Macartney [Tue, 23 May 2017 16:42:16 +0000 (17:42 +0100)] 
Don't store all old logins in .brooklyn_cli

4 years agoDon't use resp if there was an error
Geoff Macartney [Tue, 23 May 2017 16:08:45 +0000 (17:08 +0100)] 
Don't use resp if there was an error

4 years agoHandle newline/spaces in prompt for username
Geoff Macartney [Tue, 23 May 2017 16:08:15 +0000 (17:08 +0100)] 
Handle newline/spaces in prompt for username

4 years agoDon't panic on failure to connect to host
Geoff Macartney [Tue, 23 May 2017 15:48:35 +0000 (16:48 +0100)] 
Don't panic on failure to connect to host

4 years agoDon't trim password.
Geoff Macartney [Tue, 4 Apr 2017 14:26:31 +0000 (15:26 +0100)] 
Don't trim password.

4 years agoImprove login handling.
Geoff Macartney [Tue, 4 Apr 2017 13:08:18 +0000 (14:08 +0100)] 
Improve login handling.

See https://issues.apache.org/jira/browse/BROOKLYN-463.

Prompt for user name if not supplied.
Check for 401 Unauthorized and give tidier output.

5 years agoThis closes #55
Mark McKenna [Fri, 23 Jun 2017 13:38:29 +0000 (14:38 +0100)] 
This closes #55

5 years agoAllow catalog item (YAML or bundle) to be force-updated via query string flag on... 55/head
Thomas Bouron [Fri, 23 Jun 2017 10:48:30 +0000 (11:48 +0100)] 
Allow catalog item (YAML or bundle) to be force-updated via query string flag on the REST API

5 years agoThis closes #53
Alex Heneveld [Tue, 6 Jun 2017 15:55:16 +0000 (16:55 +0100)] 
This closes #53

5 years agoshow bundle info and message when doing `catalog add` 53/head
Alex Heneveld [Mon, 5 Jun 2017 12:35:02 +0000 (13:35 +0100)] 
show bundle info and message when doing `catalog add`

also supports backwards compatibility as only some API methods support the detail

5 years agoCloses #52
Geoff Macartney [Tue, 23 May 2017 14:51:44 +0000 (15:51 +0100)] 
Closes #52

Delete requrest now only fail is an unsuccessful code is returned

5 years agoDelete requrest now only fail is an unsuccessful code is returned 52/head
graeme.miller [Tue, 23 May 2017 14:47:17 +0000 (15:47 +0100)] 
Delete requrest now only fail is an unsuccessful code is returned