You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ge...@apache.org on 2018/03/23 13:50:51 UTC

[24/25] brooklyn-client git commit: Add vendor file and remove glide from build/readme

Add vendor file and remove glide from build/readme


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/799e9ccb
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/799e9ccb
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/799e9ccb

Branch: refs/heads/master
Commit: 799e9ccbe1b6bb03c84005ec95e62a21f070b244
Parents: 2da4c08
Author: Geoff Macartney <ge...@cloudsoftcorp.com>
Authored: Fri Mar 23 12:59:45 2018 +0000
Committer: Geoff Macartney <ge...@cloudsoftcorp.com>
Committed: Fri Mar 23 12:59:45 2018 +0000

----------------------------------------------------------------------
 cli/.gitignore                                  |    1 -
 cli/README.md                                   |   13 -
 cli/release/build.sh                            |   13 -
 .../github.com/NodePrime/jsonpath/.drone.yml    |   21 +
 .../github.com/NodePrime/jsonpath/.gitignore    |   24 +
 .../github.com/NodePrime/jsonpath/LICENSE       |   21 +
 .../github.com/NodePrime/jsonpath/README.md     |  138 ++
 .../NodePrime/jsonpath/cli/jsonpath/main.go     |   94 ++
 .../github.com/NodePrime/jsonpath/constants.go  |   14 +
 .../github.com/NodePrime/jsonpath/eval.go       |  335 ++++
 .../NodePrime/jsonpath/eval_states.go           |  193 +++
 .../github.com/NodePrime/jsonpath/eval_test.go  |  101 ++
 .../github.com/NodePrime/jsonpath/expression.go |  429 +++++
 .../NodePrime/jsonpath/expression_states.go     |  287 ++++
 .../jsonpath/expression_states_test.go          |   40 +
 .../NodePrime/jsonpath/expression_test.go       |  226 +++
 .../NodePrime/jsonpath/json_states.go           |  266 +++
 .../NodePrime/jsonpath/json_states_test.go      |  172 ++
 .../github.com/NodePrime/jsonpath/lexer.go      |   86 +
 .../NodePrime/jsonpath/lexer_reader.go          |  161 ++
 .../NodePrime/jsonpath/lexer_slice.go           |  131 ++
 .../github.com/NodePrime/jsonpath/lexer_test.go |  309 ++++
 .../github.com/NodePrime/jsonpath/misc.go       |  181 +++
 .../github.com/NodePrime/jsonpath/path.go       |  208 +++
 .../NodePrime/jsonpath/path_states.go           |  213 +++
 .../NodePrime/jsonpath/path_states_test.go      |   30 +
 .../github.com/NodePrime/jsonpath/path_test.go  |   40 +
 .../github.com/NodePrime/jsonpath/queue.go      |   55 +
 .../github.com/NodePrime/jsonpath/result.go     |   57 +
 cli/vendor/github.com/NodePrime/jsonpath/run.go |   27 +
 .../github.com/NodePrime/jsonpath/stack.go      |  148 ++
 .../github.com/NodePrime/jsonpath/stack_test.go |   56 +
 cli/vendor/github.com/urfave/cli/.travis.yml    |   19 +
 cli/vendor/github.com/urfave/cli/LICENSE        |   21 +
 cli/vendor/github.com/urfave/cli/README.md      |  352 ++++
 cli/vendor/github.com/urfave/cli/app.go         |  349 ++++
 cli/vendor/github.com/urfave/cli/app_test.go    | 1047 ++++++++++++
 cli/vendor/github.com/urfave/cli/appveyor.yml   |   16 +
 .../urfave/cli/autocomplete/bash_autocomplete   |   14 +
 .../urfave/cli/autocomplete/zsh_autocomplete    |    5 +
 cli/vendor/github.com/urfave/cli/cli.go         |   40 +
 cli/vendor/github.com/urfave/cli/command.go     |  250 +++
 .../github.com/urfave/cli/command_test.go       |   97 ++
 cli/vendor/github.com/urfave/cli/context.go     |  388 +++++
 .../github.com/urfave/cli/context_test.go       |  113 ++
 cli/vendor/github.com/urfave/cli/flag.go        |  546 +++++++
 cli/vendor/github.com/urfave/cli/flag_test.go   |  859 ++++++++++
 cli/vendor/github.com/urfave/cli/help.go        |  248 +++
 cli/vendor/github.com/urfave/cli/help_test.go   |   94 ++
 .../github.com/urfave/cli/helpers_test.go       |   19 +
 cli/vendor/golang.org/x/crypto/.gitattributes   |   10 +
 cli/vendor/golang.org/x/crypto/.gitignore       |    2 +
 cli/vendor/golang.org/x/crypto/AUTHORS          |    3 +
 cli/vendor/golang.org/x/crypto/CONTRIBUTING.md  |   31 +
 cli/vendor/golang.org/x/crypto/CONTRIBUTORS     |    3 +
 cli/vendor/golang.org/x/crypto/LICENSE          |   27 +
 cli/vendor/golang.org/x/crypto/PATENTS          |   22 +
 cli/vendor/golang.org/x/crypto/README           |    3 +
 cli/vendor/golang.org/x/crypto/bcrypt/base64.go |   35 +
 cli/vendor/golang.org/x/crypto/bcrypt/bcrypt.go |  294 ++++
 .../golang.org/x/crypto/bcrypt/bcrypt_test.go   |  226 +++
 .../golang.org/x/crypto/blowfish/block.go       |  159 ++
 .../x/crypto/blowfish/blowfish_test.go          |  274 ++++
 .../golang.org/x/crypto/blowfish/cipher.go      |   91 ++
 .../golang.org/x/crypto/blowfish/const.go       |  199 +++
 cli/vendor/golang.org/x/crypto/bn256/bn256.go   |  404 +++++
 .../golang.org/x/crypto/bn256/bn256_test.go     |  304 ++++
 .../golang.org/x/crypto/bn256/constants.go      |   44 +
 cli/vendor/golang.org/x/crypto/bn256/curve.go   |  278 ++++
 .../golang.org/x/crypto/bn256/example_test.go   |   43 +
 cli/vendor/golang.org/x/crypto/bn256/gfp12.go   |  200 +++
 cli/vendor/golang.org/x/crypto/bn256/gfp2.go    |  219 +++
 cli/vendor/golang.org/x/crypto/bn256/gfp6.go    |  296 ++++
 cli/vendor/golang.org/x/crypto/bn256/optate.go  |  395 +++++
 cli/vendor/golang.org/x/crypto/bn256/twist.go   |  249 +++
 cli/vendor/golang.org/x/crypto/cast5/cast5.go   |  526 ++++++
 .../golang.org/x/crypto/cast5/cast5_test.go     |  106 ++
 cli/vendor/golang.org/x/crypto/codereview.cfg   |    1 +
 .../x/crypto/curve25519/const_amd64.s           |   20 +
 .../x/crypto/curve25519/cswap_amd64.s           |   88 +
 .../x/crypto/curve25519/curve25519.go           |  841 ++++++++++
 .../x/crypto/curve25519/curve25519_test.go      |   29 +
 .../golang.org/x/crypto/curve25519/doc.go       |   23 +
 .../x/crypto/curve25519/freeze_amd64.s          |   94 ++
 .../x/crypto/curve25519/ladderstep_amd64.s      | 1398 ++++++++++++++++
 .../x/crypto/curve25519/mont25519_amd64.go      |  240 +++
 .../golang.org/x/crypto/curve25519/mul_amd64.s  |  191 +++
 .../x/crypto/curve25519/square_amd64.s          |  153 ++
 .../golang.org/x/crypto/hkdf/example_test.go    |   61 +
 cli/vendor/golang.org/x/crypto/hkdf/hkdf.go     |   75 +
 .../golang.org/x/crypto/hkdf/hkdf_test.go       |  370 +++++
 cli/vendor/golang.org/x/crypto/md4/md4.go       |  118 ++
 cli/vendor/golang.org/x/crypto/md4/md4_test.go  |   71 +
 cli/vendor/golang.org/x/crypto/md4/md4block.go  |   89 +
 cli/vendor/golang.org/x/crypto/nacl/box/box.go  |   85 +
 .../golang.org/x/crypto/nacl/box/box_test.go    |   78 +
 .../x/crypto/nacl/secretbox/secretbox.go        |  149 ++
 .../x/crypto/nacl/secretbox/secretbox_test.go   |   91 ++
 cli/vendor/golang.org/x/crypto/ocsp/ocsp.go     |  673 ++++++++
 .../golang.org/x/crypto/ocsp/ocsp_test.go       |  584 +++++++
 .../golang.org/x/crypto/openpgp/armor/armor.go  |  219 +++
 .../x/crypto/openpgp/armor/armor_test.go        |   95 ++
 .../golang.org/x/crypto/openpgp/armor/encode.go |  160 ++
 .../x/crypto/openpgp/canonical_text.go          |   59 +
 .../x/crypto/openpgp/canonical_text_test.go     |   52 +
 .../x/crypto/openpgp/clearsign/clearsign.go     |  372 +++++
 .../crypto/openpgp/clearsign/clearsign_test.go  |  197 +++
 .../x/crypto/openpgp/elgamal/elgamal.go         |  122 ++
 .../x/crypto/openpgp/elgamal/elgamal_test.go    |   49 +
 .../x/crypto/openpgp/errors/errors.go           |   72 +
 cli/vendor/golang.org/x/crypto/openpgp/keys.go  |  633 ++++++++
 .../golang.org/x/crypto/openpgp/keys_test.go    |  370 +++++
 .../x/crypto/openpgp/packet/compressed.go       |  123 ++
 .../x/crypto/openpgp/packet/compressed_test.go  |   41 +
 .../x/crypto/openpgp/packet/config.go           |   91 ++
 .../x/crypto/openpgp/packet/encrypted_key.go    |  199 +++
 .../crypto/openpgp/packet/encrypted_key_test.go |  146 ++
 .../x/crypto/openpgp/packet/literal.go          |   89 +
 .../golang.org/x/crypto/openpgp/packet/ocfb.go  |  143 ++
 .../x/crypto/openpgp/packet/ocfb_test.go        |   46 +
 .../crypto/openpgp/packet/one_pass_signature.go |   73 +
 .../x/crypto/openpgp/packet/opaque.go           |  162 ++
 .../x/crypto/openpgp/packet/opaque_test.go      |   67 +
 .../x/crypto/openpgp/packet/packet.go           |  539 ++++++
 .../x/crypto/openpgp/packet/packet_test.go      |  255 +++
 .../x/crypto/openpgp/packet/private_key.go      |  326 ++++
 .../x/crypto/openpgp/packet/private_key_test.go |   69 +
 .../x/crypto/openpgp/packet/public_key.go       |  724 +++++++++
 .../x/crypto/openpgp/packet/public_key_test.go  |  202 +++
 .../x/crypto/openpgp/packet/public_key_v3.go    |  280 ++++
 .../crypto/openpgp/packet/public_key_v3_test.go |   82 +
 .../x/crypto/openpgp/packet/reader.go           |   76 +
 .../x/crypto/openpgp/packet/signature.go        |  699 ++++++++
 .../x/crypto/openpgp/packet/signature_test.go   |   42 +
 .../x/crypto/openpgp/packet/signature_v3.go     |  146 ++
 .../crypto/openpgp/packet/signature_v3_test.go  |   92 ++
 .../openpgp/packet/symmetric_key_encrypted.go   |  155 ++
 .../packet/symmetric_key_encrypted_test.go      |  103 ++
 .../openpgp/packet/symmetrically_encrypted.go   |  290 ++++
 .../packet/symmetrically_encrypted_test.go      |  123 ++
 .../x/crypto/openpgp/packet/userattribute.go    |   91 ++
 .../crypto/openpgp/packet/userattribute_test.go |  109 ++
 .../x/crypto/openpgp/packet/userid.go           |  160 ++
 .../x/crypto/openpgp/packet/userid_test.go      |   87 +
 cli/vendor/golang.org/x/crypto/openpgp/read.go  |  439 +++++
 .../golang.org/x/crypto/openpgp/read_test.go    |  512 ++++++
 .../golang.org/x/crypto/openpgp/s2k/s2k.go      |  273 ++++
 .../golang.org/x/crypto/openpgp/s2k/s2k_test.go |  137 ++
 cli/vendor/golang.org/x/crypto/openpgp/write.go |  378 +++++
 .../golang.org/x/crypto/openpgp/write_test.go   |  259 +++
 .../x/crypto/otr/libotr_test_helper.c           |  197 +++
 cli/vendor/golang.org/x/crypto/otr/otr.go       | 1408 ++++++++++++++++
 cli/vendor/golang.org/x/crypto/otr/otr_test.go  |  470 ++++++
 cli/vendor/golang.org/x/crypto/otr/smp.go       |  572 +++++++
 cli/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go |   77 +
 .../golang.org/x/crypto/pbkdf2/pbkdf2_test.go   |  157 ++
 .../golang.org/x/crypto/pkcs12/bmp-string.go    |   50 +
 .../x/crypto/pkcs12/bmp-string_test.go          |   63 +
 cli/vendor/golang.org/x/crypto/pkcs12/crypto.go |  131 ++
 .../golang.org/x/crypto/pkcs12/crypto_test.go   |  125 ++
 cli/vendor/golang.org/x/crypto/pkcs12/errors.go |   23 +
 .../x/crypto/pkcs12/internal/rc2/bench_test.go  |   27 +
 .../x/crypto/pkcs12/internal/rc2/rc2.go         |  274 ++++
 .../x/crypto/pkcs12/internal/rc2/rc2_test.go    |   93 ++
 cli/vendor/golang.org/x/crypto/pkcs12/mac.go    |   45 +
 .../golang.org/x/crypto/pkcs12/mac_test.go      |   42 +
 cli/vendor/golang.org/x/crypto/pkcs12/pbkdf.go  |  170 ++
 .../golang.org/x/crypto/pkcs12/pbkdf_test.go    |   34 +
 cli/vendor/golang.org/x/crypto/pkcs12/pkcs12.go |  342 ++++
 .../golang.org/x/crypto/pkcs12/pkcs12_test.go   |  138 ++
 .../golang.org/x/crypto/pkcs12/safebags.go      |   57 +
 .../golang.org/x/crypto/poly1305/const_amd64.s  |   45 +
 .../golang.org/x/crypto/poly1305/poly1305.go    |   32 +
 .../x/crypto/poly1305/poly1305_amd64.s          |  497 ++++++
 .../golang.org/x/crypto/poly1305/poly1305_arm.s |  379 +++++
 .../x/crypto/poly1305/poly1305_test.go          |   86 +
 .../golang.org/x/crypto/poly1305/sum_amd64.go   |   24 +
 .../golang.org/x/crypto/poly1305/sum_arm.go     |   24 +
 .../golang.org/x/crypto/poly1305/sum_ref.go     | 1531 ++++++++++++++++++
 .../golang.org/x/crypto/ripemd160/ripemd160.go  |  120 ++
 .../x/crypto/ripemd160/ripemd160_test.go        |   64 +
 .../x/crypto/ripemd160/ripemd160block.go        |  161 ++
 .../x/crypto/salsa20/salsa/hsalsa20.go          |  144 ++
 .../x/crypto/salsa20/salsa/salsa2020_amd64.s    |  902 +++++++++++
 .../x/crypto/salsa20/salsa/salsa208.go          |  199 +++
 .../x/crypto/salsa20/salsa/salsa20_amd64.go     |   23 +
 .../x/crypto/salsa20/salsa/salsa20_ref.go       |  234 +++
 .../x/crypto/salsa20/salsa/salsa_test.go        |   35 +
 .../golang.org/x/crypto/salsa20/salsa20.go      |   54 +
 .../golang.org/x/crypto/salsa20/salsa20_test.go |  139 ++
 cli/vendor/golang.org/x/crypto/scrypt/scrypt.go |  243 +++
 .../golang.org/x/crypto/scrypt/scrypt_test.go   |  160 ++
 cli/vendor/golang.org/x/crypto/sha3/doc.go      |   66 +
 cli/vendor/golang.org/x/crypto/sha3/hashes.go   |   65 +
 cli/vendor/golang.org/x/crypto/sha3/keccakf.go  |  410 +++++
 cli/vendor/golang.org/x/crypto/sha3/register.go |   18 +
 cli/vendor/golang.org/x/crypto/sha3/sha3.go     |  193 +++
 .../golang.org/x/crypto/sha3/sha3_test.go       |  306 ++++
 cli/vendor/golang.org/x/crypto/sha3/shake.go    |   60 +
 .../sha3/testdata/keccakKats.json.deflate       |  Bin 0 -> 521342 bytes
 cli/vendor/golang.org/x/crypto/sha3/xor.go      |   16 +
 .../golang.org/x/crypto/sha3/xor_generic.go     |   28 +
 .../golang.org/x/crypto/sha3/xor_unaligned.go   |   58 +
 .../golang.org/x/crypto/ssh/agent/client.go     |  615 +++++++
 .../x/crypto/ssh/agent/client_test.go           |  287 ++++
 .../golang.org/x/crypto/ssh/agent/forward.go    |  103 ++
 .../golang.org/x/crypto/ssh/agent/keyring.go    |  184 +++
 .../x/crypto/ssh/agent/keyring_test.go          |   78 +
 .../golang.org/x/crypto/ssh/agent/server.go     |  209 +++
 .../x/crypto/ssh/agent/server_test.go           |   77 +
 .../x/crypto/ssh/agent/testdata_test.go         |   64 +
 .../golang.org/x/crypto/ssh/benchmark_test.go   |  122 ++
 cli/vendor/golang.org/x/crypto/ssh/buffer.go    |   98 ++
 .../golang.org/x/crypto/ssh/buffer_test.go      |   87 +
 cli/vendor/golang.org/x/crypto/ssh/certs.go     |  501 ++++++
 .../golang.org/x/crypto/ssh/certs_test.go       |  216 +++
 cli/vendor/golang.org/x/crypto/ssh/channel.go   |  631 ++++++++
 cli/vendor/golang.org/x/crypto/ssh/cipher.go    |  552 +++++++
 .../golang.org/x/crypto/ssh/cipher_test.go      |  127 ++
 cli/vendor/golang.org/x/crypto/ssh/client.go    |  213 +++
 .../golang.org/x/crypto/ssh/client_auth.go      |  441 +++++
 .../golang.org/x/crypto/ssh/client_auth_test.go |  393 +++++
 .../golang.org/x/crypto/ssh/client_test.go      |   39 +
 cli/vendor/golang.org/x/crypto/ssh/common.go    |  354 ++++
 .../golang.org/x/crypto/ssh/connection.go       |  144 ++
 cli/vendor/golang.org/x/crypto/ssh/doc.go       |   18 +
 .../golang.org/x/crypto/ssh/example_test.go     |  211 +++
 cli/vendor/golang.org/x/crypto/ssh/handshake.go |  412 +++++
 .../golang.org/x/crypto/ssh/handshake_test.go   |  415 +++++
 cli/vendor/golang.org/x/crypto/ssh/kex.go       |  526 ++++++
 cli/vendor/golang.org/x/crypto/ssh/kex_test.go  |   50 +
 cli/vendor/golang.org/x/crypto/ssh/keys.go      |  720 ++++++++
 cli/vendor/golang.org/x/crypto/ssh/keys_test.go |  437 +++++
 cli/vendor/golang.org/x/crypto/ssh/mac.go       |   57 +
 .../golang.org/x/crypto/ssh/mempipe_test.go     |  110 ++
 cli/vendor/golang.org/x/crypto/ssh/messages.go  |  725 +++++++++
 .../golang.org/x/crypto/ssh/messages_test.go    |  254 +++
 cli/vendor/golang.org/x/crypto/ssh/mux.go       |  356 ++++
 cli/vendor/golang.org/x/crypto/ssh/mux_test.go  |  525 ++++++
 cli/vendor/golang.org/x/crypto/ssh/server.go    |  495 ++++++
 cli/vendor/golang.org/x/crypto/ssh/session.go   |  605 +++++++
 .../golang.org/x/crypto/ssh/session_test.go     |  774 +++++++++
 cli/vendor/golang.org/x/crypto/ssh/tcpip.go     |  407 +++++
 .../golang.org/x/crypto/ssh/tcpip_test.go       |   20 +
 .../x/crypto/ssh/terminal/terminal.go           |  892 ++++++++++
 .../x/crypto/ssh/terminal/terminal_test.go      |  269 +++
 .../golang.org/x/crypto/ssh/terminal/util.go    |  128 ++
 .../x/crypto/ssh/terminal/util_bsd.go           |   12 +
 .../x/crypto/ssh/terminal/util_linux.go         |   11 +
 .../x/crypto/ssh/terminal/util_windows.go       |  174 ++
 .../x/crypto/ssh/test/agent_unix_test.go        |   59 +
 .../golang.org/x/crypto/ssh/test/cert_test.go   |   47 +
 cli/vendor/golang.org/x/crypto/ssh/test/doc.go  |    7 +
 .../x/crypto/ssh/test/forward_unix_test.go      |  160 ++
 .../x/crypto/ssh/test/session_test.go           |  340 ++++
 .../golang.org/x/crypto/ssh/test/tcpip_test.go  |   46 +
 .../x/crypto/ssh/test/test_unix_test.go         |  261 +++
 .../x/crypto/ssh/test/testdata_test.go          |   64 +
 .../golang.org/x/crypto/ssh/testdata/doc.go     |    8 +
 .../golang.org/x/crypto/ssh/testdata/keys.go    |   43 +
 .../golang.org/x/crypto/ssh/testdata_test.go    |   63 +
 cli/vendor/golang.org/x/crypto/ssh/transport.go |  332 ++++
 .../golang.org/x/crypto/ssh/transport_test.go   |  109 ++
 cli/vendor/golang.org/x/crypto/tea/cipher.go    |  109 ++
 cli/vendor/golang.org/x/crypto/tea/tea_test.go  |   93 ++
 .../golang.org/x/crypto/twofish/twofish.go      |  342 ++++
 .../golang.org/x/crypto/twofish/twofish_test.go |  129 ++
 cli/vendor/golang.org/x/crypto/xtea/block.go    |   66 +
 cli/vendor/golang.org/x/crypto/xtea/cipher.go   |   82 +
 .../golang.org/x/crypto/xtea/xtea_test.go       |  229 +++
 cli/vendor/golang.org/x/crypto/xts/xts.go       |  138 ++
 cli/vendor/golang.org/x/crypto/xts/xts_test.go  |   85 +
 272 files changed, 56494 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/.gitignore
----------------------------------------------------------------------
diff --git a/cli/.gitignore b/cli/.gitignore
index 40209ea..0ea7dd8 100644
--- a/cli/.gitignore
+++ b/cli/.gitignore
@@ -1,3 +1,2 @@
 temp_test
-vendor/
 .glide/

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/README.md
----------------------------------------------------------------------
diff --git a/cli/README.md b/cli/README.md
index f60d120..e6fee04 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -55,19 +55,6 @@ cd cli
 ```
 
 
-## Installing Dependencies
-
-The CLI has a small number of dependencies, including the popular `urfave/cli`.
-To manage the version of dependencies, the CLI
-code currently uses [Glide](https://github.com/Masterminds/glide) to fetch
-and maintain these:
-
-```bash
-go get github.com/Masterminds/glide
-$GOPATH/bin/glide install
-```
-
-
 ## Compiling the code with Go for development purposes
 
 Just use the regular Go build commands:

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/release/build.sh
----------------------------------------------------------------------
diff --git a/cli/release/build.sh b/cli/release/build.sh
index c8089b4..beb1c2f 100755
--- a/cli/release/build.sh
+++ b/cli/release/build.sh
@@ -182,19 +182,6 @@ mkdir -p ${GOPATH}/src/${PROJECT%/*}
 [ -e ${GOPATH}/src/${PROJECT} ] || ln -s ${sourcedir} ${GOPATH}/src/${PROJECT}
 PATH=${GOPATH}/bin:${PATH}
 
-command -v $GLIDE >/dev/null 2>&1 || {
-	echo Installing $GLIDE
-	go get github.com/Masterminds/glide || { echo failed installing $GLIDE ; exit 1; }
-}
-
-command -v $GLIDE >/dev/null 2>&1 || {
-	echo "Command for resolving dependencies ($GLIDE) not found and could not be installed in $GOPATH"
-	exit 1
-}
-
-echo "Installing dependencies"
-$GLIDE install
-
 if [ -n "$all" -a \( -n "$os" -o -n "$arch" \) ]; then
 	show_help
 	echo "OS and ARCH must not be combined with ALL"

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/.drone.yml
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/.drone.yml b/cli/vendor/github.com/NodePrime/jsonpath/.drone.yml
new file mode 100644
index 0000000..f184f5c
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/.drone.yml
@@ -0,0 +1,21 @@
+image: nodeprimedev/centos6.5-dev
+env:
+  - REPO=agent
+  - SHORT_COMMIT=$(echo $DRONE_COMMIT | cut -b1-7)    
+  - OS_NAME=$(uname -s | tr A-Z a-z)
+  - HW_ARCH=$(uname -m)
+  - PACKAGE_NAME=$REPO-$OS_NAME-$HW_ARCH-$SHORT_COMMIT.tar.gz
+  - PACKAGE_ROOT=./build
+  - REPORT_ROOT=./build
+  - BUILD_ID=$DRONE_BUILD_NUMBER
+  - GIT_COMMIT=$DRONE_COMMIT
+  - GIT_BRANCH=$DRONE_BRANCH
+script:
+    #################################################################
+    # Commands to execute CI build
+    #################################################################
+  - go get -t ./...
+   # Test all unit tests with race flag
+  - go test -v -race ./...
+   # Run benchmarks
+  - go test -bench=. -test.run PC -test.benchmem ./...

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/.gitignore
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/.gitignore b/cli/vendor/github.com/NodePrime/jsonpath/.gitignore
new file mode 100644
index 0000000..daf913b
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/LICENSE
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/LICENSE b/cli/vendor/github.com/NodePrime/jsonpath/LICENSE
new file mode 100644
index 0000000..a0fb656
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 NodePrime Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/README.md
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/README.md b/cli/vendor/github.com/NodePrime/jsonpath/README.md
new file mode 100644
index 0000000..54dc3de
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/README.md
@@ -0,0 +1,138 @@
+[![Coverage](http://gocover.io/_badge/github.com/NodePrime/jsonpath)](http://gocover.io/github.com/NodePrime/jsonpath)
+# jsonpath  
+  
+jsonpath is used to pull values out of a JSON document without unmarshalling the string into an object.  At the loss of post-parse random access and conversion to primitive types, you gain faster return speeds and lower memory utilization.  If the value you want is located near the start of the json, the evaluator will terminate after reaching and recording its destination.  
+  
+The evaluator can be initialized with several paths, so you can retrieve multiple sections of the document with just one scan.  Naturally, when all paths have been reached, the evaluator will early terminate.  
+  
+For each value returned by a path, you'll also get the keys & indexes needed to reach that value.  Use the `keys` flag to view this in the CLI.  The Go package will return an `[]interface{}` of length `n` with indexes `0 - (n-2)` being the keys and the value at index `n-1`.  
+  
+### CLI   
+```shell
+go get github.com/NodePrime/jsonpath/cli/jsonpath
+cat yourData.json | jsonpath -k -p '$.Items[*].title+'
+```
+
+##### Usage  
+```shell
+-f, --file="": Path to json file  
+-j, --json="": JSON text  
+-k, --keys=false: Print keys & indexes that lead to value  
+-p, --path=[]: One or more paths to target in JSON
+```
+
+  
+### Go Package  
+go get github.com/NodePrime/jsonpath  
+ 
+```go
+paths, err := jsonpath.ParsePaths(pathStrings ...string) {
+```  
+
+```go
+eval, err := jsonpath.EvalPathsInBytes(json []byte, paths) 
+// OR
+eval, err := jsonpath.EvalPathsInReader(r io.Reader, paths)
+```
+
+then  
+```go  
+for {
+	if result, ok := eval.Next(); ok {
+		fmt.Println(result.Pretty(true)) // true -> show keys in pretty string
+	} else {
+		break
+	}
+}
+if eval.Error != nil {
+	return eval.Error
+}
+```  
+
+`eval.Next()` will traverse JSON until another value is found.  This has the potential of traversing the entire JSON document in an attempt to find one.  If you prefer to have more control over traversing, use the `eval.Iterate()` method.  It will return after every scanned JSON token and return `([]*Result, bool)`.  This array will usually be empty, but occasionally contain results.  
+     
+### Path Syntax  
+All paths start from the root node `$`.  Similar to getting properties in a JavaScript object, a period `.title` or brackets `["title"]` are used.  
+  
+Syntax|Meaning|Examples
+------|-------|-------
+`$`|root of doc|  
+`.`|property selector |`$.Items`
+`["abc"]`|quoted property selector|`$["Items"]`
+`*`|wildcard property name|`$.*` 
+`[n]`|Nth index of array|`[0]` `[1]`
+`[n:m]`|Nth index to m-1 index (same as Go slicing)|`[0:1]` `[2:5]`
+`[n:]`|Nth index to end of array|`[1:]` `[2:]`
+`[*]`|wildcard index of array|`[*]`
+`+`|get value at end of path|`$.title+`
+`?(expression)`|where clause (expression can reference current json node with @)|`?(@.title == "ABC")`
+  
+  
+Expressions  
+- paths (that start from current node `@`)
+- numbers (integers, floats, scientific notation)
+- mathematical operators (+ - / * ^)
+- numerical comparisos (< <= > >=)
+- logic operators (&& || == !=)
+- parentheses `(2 < (3 * 5))`
+- static values like (`true`, `false`)
+- `@.value > 0.5`
+
+Example: this will only return tags of all items that match this expression.
+`$.Items[*]?(@.title == "A Tale of Two Cities").tags`  
+
+   
+Example: 
+```javascript
+{  
+	"Items":   
+		[  
+			{  
+				"title": "A Midsummer Night's Dream",  
+				"tags":[  
+					"comedy",  
+					"shakespeare",  
+					"play"  
+				]  
+			},{  
+				"title": "A Tale of Two Cities",  
+				"tags":[  
+					"french",  
+					"revolution",  
+					"london"  
+				]  
+			}  
+		]  
+} 
+```
+	
+Example Paths:   
+*CLI*  
+```shell
+jsonpath --file=example.json --path='$.Items[*].tags[*]+' --keys
+```   
+"Items"	0	"tags"	0	"comedy"  
+"Items"	0	"tags"	1	"shakespeare"  
+"Items"	0	"tags"	2	"play"  
+"Items"	1	"tags"	0	"french"  
+"Items"	1	"tags"	1	"revolution"  
+"Items"	1	"tags"	2	"london"  
+  
+*Paths*  
+`$.Items[*].title+`   
+... "A Midsummer Night's Dream"   
+... "A Tale of Two Cities"   
+  
+`$.Items[*].tags+`    
+... ["comedy","shakespeare","play"]  
+... ["french","revolution","london"]  
+  
+`$.Items[*].tags[*]+`  
+... "comedy"  
+... "shakespeare"  
+... "play"  
+... "french"  
+... "revolution"  
+...  "london"  
+  
+... = keys/indexes of path  

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/cli/jsonpath/main.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/cli/jsonpath/main.go b/cli/vendor/github.com/NodePrime/jsonpath/cli/jsonpath/main.go
new file mode 100644
index 0000000..7ef9c00
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/cli/jsonpath/main.go
@@ -0,0 +1,94 @@
+package main
+
+import (
+	"bufio"
+	"fmt"
+	"os"
+	"strings"
+
+	"github.com/NodePrime/jsonpath"
+	flag "github.com/ogier/pflag"
+)
+
+func main() {
+	var pathStrings pathSlice
+	filePtr := flag.StringP("file", "f", "", "Path to json file")
+	jsonPtr := flag.StringP("json", "j", "", "JSON text")
+	flag.VarP(&pathStrings, "path", "p", "One or more paths to target in JSON")
+	showKeysPtr := flag.BoolP("keys", "k", false, "Print keys & indexes that lead to value")
+	flag.Usage = func() {
+		fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
+		flag.PrintDefaults()
+		fmt.Fprintln(os.Stderr, "Pipe JSON to StdIn by not specifying --file or --json ")
+	}
+	flag.Parse()
+
+	if len(pathStrings) == 0 {
+		fmt.Println("Must specify one or more paths with the --path flag")
+		os.Exit(1)
+	}
+
+	paths, err := jsonpath.ParsePaths(pathStrings...)
+	if err != nil {
+		fmt.Println(fmt.Errorf("Failed to parse paths: %q", err.Error()))
+		os.Exit(1)
+	}
+
+	if filePtr != nil && *filePtr != "" {
+		f, err := os.Open(*filePtr)
+		if err != nil {
+			fmt.Println(fmt.Errorf("Failed to open file: %q", err.Error()))
+			os.Exit(1)
+		}
+
+		eval, err := jsonpath.EvalPathsInReader(f, paths)
+		checkAndHandleError(err)
+		run(eval, *showKeysPtr)
+		checkAndHandleError(eval.Error)
+		f.Close()
+
+	} else if jsonPtr != nil && *jsonPtr != "" {
+		eval, err := jsonpath.EvalPathsInBytes([]byte(*jsonPtr), paths)
+		checkAndHandleError(err)
+		run(eval, *showKeysPtr)
+		checkAndHandleError(eval.Error)
+	} else {
+		reader := bufio.NewReader(os.Stdin)
+		eval, err := jsonpath.EvalPathsInReader(reader, paths)
+		checkAndHandleError(err)
+		run(eval, *showKeysPtr)
+		checkAndHandleError(eval.Error)
+	}
+}
+
+func run(eval *jsonpath.Eval, showKeys bool) {
+	for {
+		result, running := eval.Next()
+		if result != nil {
+			fmt.Print(result.Pretty(showKeys))
+		}
+		if !running {
+			break
+		}
+	}
+}
+
+func checkAndHandleError(err error) {
+	if err != nil {
+		fmt.Println(err)
+		os.Exit(1)
+	}
+}
+
+type pathSlice []string
+
+func (i *pathSlice) Set(value string) error {
+	for _, dt := range strings.Split(value, ",") {
+		*i = append(*i, dt)
+	}
+	return nil
+}
+
+func (i *pathSlice) String() string {
+	return fmt.Sprint(*i)
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/constants.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/constants.go b/cli/vendor/github.com/NodePrime/jsonpath/constants.go
new file mode 100644
index 0000000..4bd54b4
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/constants.go
@@ -0,0 +1,14 @@
+package jsonpath
+
+const (
+	BadStructure         = "Bad Structure"
+	NoMoreResults        = "No more results"
+	UnexpectedToken      = "Unexpected token in evaluation"
+	AbruptTokenStreamEnd = "Token reader is not sending anymore tokens"
+)
+
+var (
+	bytesTrue  = []byte{'t', 'r', 'u', 'e'}
+	bytesFalse = []byte{'f', 'a', 'l', 's', 'e'}
+	bytesNull  = []byte{'n', 'u', 'l', 'l'}
+)

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/eval.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/eval.go b/cli/vendor/github.com/NodePrime/jsonpath/eval.go
new file mode 100644
index 0000000..563b998
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/eval.go
@@ -0,0 +1,335 @@
+package jsonpath
+
+import (
+	"bytes"
+	"fmt"
+)
+
+type queryStateFn func(*query, *Eval, *Item) queryStateFn
+
+type query struct {
+	Path
+	state       queryStateFn
+	start       int
+	pos         int
+	firstType   int // first json token type in buffer
+	buffer      bytes.Buffer
+	resultQueue *Results
+	valLoc      stack // capture the current location stack at capture
+	errors      []error
+	buckets     stack // stack of exprBucket
+}
+
+type exprBucket struct {
+	operatorLoc int
+	expression  []Item
+	queries     []*query
+	results     *Results
+}
+
+type evalStateFn func(*Eval, *Item) evalStateFn
+
+type Eval struct {
+	tr         tokenReader
+	levelStack intStack
+	location   stack
+	queries    map[string]*query
+	state      evalStateFn
+	prevIndex  int
+	nextKey    []byte
+	copyValues bool
+
+	resultQueue *Results
+	Error       error
+}
+
+func newEvaluation(tr tokenReader, paths ...*Path) *Eval {
+	e := &Eval{
+		tr:          tr,
+		location:    *newStack(),
+		levelStack:  *newIntStack(),
+		state:       evalRoot,
+		queries:     make(map[string]*query, 0),
+		prevIndex:   -1,
+		nextKey:     nil,
+		copyValues:  true, // depends on which lexer is used
+		resultQueue: newResults(),
+	}
+
+	for _, p := range paths {
+		e.queries[p.stringValue] = newQuery(p)
+	}
+	// Determine whether to copy emitted item values ([]byte) from lexer
+	switch tr.(type) {
+	case *readerLexer:
+		e.copyValues = true
+	default:
+		e.copyValues = false
+	}
+
+	return e
+}
+
+func newQuery(p *Path) *query {
+	return &query{
+		Path:        *p,
+		state:       pathMatchOp,
+		start:       -1,
+		pos:         -1,
+		buffer:      *bytes.NewBuffer(make([]byte, 0, 50)),
+		valLoc:      *newStack(),
+		errors:      make([]error, 0),
+		resultQueue: newResults(),
+		buckets:     *newStack(),
+	}
+}
+
+func (e *Eval) Iterate() (*Results, bool) {
+	e.resultQueue.clear()
+
+	t, ok := e.tr.next()
+	if !ok || e.state == nil {
+		return nil, false
+	}
+
+	// run evaluator function
+	e.state = e.state(e, t)
+
+	anyRunning := false
+	// run path function for each path
+	for str, query := range e.queries {
+		anyRunning = true
+		query.state = query.state(query, e, t)
+		if query.state == nil {
+			delete(e.queries, str)
+		}
+
+		if query.resultQueue.len() > 0 {
+			e.resultQueue.push(query.resultQueue.Pop())
+		}
+
+		for _, b := range query.buckets.values {
+			bucket := b.(exprBucket)
+			for _, dq := range bucket.queries {
+				dq.state = dq.state(dq, e, t)
+
+				if query.resultQueue.len() > 0 {
+					e.resultQueue.push(query.resultQueue.Pop())
+				}
+			}
+		}
+	}
+
+	if !anyRunning {
+		return nil, false
+	}
+
+	if e.Error != nil {
+		return nil, false
+	}
+
+	return e.resultQueue, true
+}
+
+func (e *Eval) Next() (*Result, bool) {
+	if e.resultQueue.len() > 0 {
+		return e.resultQueue.Pop(), true
+	}
+
+	for {
+		if _, ok := e.Iterate(); ok {
+			if e.resultQueue.len() > 0 {
+				return e.resultQueue.Pop(), true
+			}
+		} else {
+			break
+		}
+
+	}
+	return nil, false
+}
+
+func (q *query) loc() int {
+	return abs(q.pos-q.start) + q.start
+}
+
+func (q *query) trySpillOver() {
+	if b, ok := q.buckets.peek(); ok {
+		bucket := b.(exprBucket)
+		if q.loc() < bucket.operatorLoc {
+			q.buckets.pop()
+
+			exprRes, err := bucket.evaluate()
+			if err != nil {
+				q.errors = append(q.errors, err)
+			}
+			if exprRes {
+				next, ok := q.buckets.peek()
+				var spillover *Results
+				if !ok {
+					// fmt.Println("Spilling over into end queue")
+					spillover = q.resultQueue
+				} else {
+					// fmt.Println("Spilling over into lower bucket")
+					nextBucket := next.(exprBucket)
+					spillover = nextBucket.results
+				}
+				for {
+					v := bucket.results.Pop()
+					if v != nil {
+						spillover.push(v)
+					} else {
+						break
+					}
+				}
+			}
+		}
+	}
+}
+
+func pathMatchOp(q *query, e *Eval, i *Item) queryStateFn {
+	curLocation := e.location.len() - 1
+
+	if q.loc() > curLocation {
+		q.pos -= 1
+		q.trySpillOver()
+	} else if q.loc() <= curLocation {
+		if q.loc() == curLocation-1 {
+			if len(q.operators)+q.start >= curLocation {
+				current, _ := e.location.peek()
+				nextOp := q.operators[abs(q.loc()-q.start)]
+				if itemMatchOperator(current, i, nextOp) {
+					q.pos += 1
+
+					if nextOp.whereClauseBytes != nil && len(nextOp.whereClause) > 0 {
+						bucket := exprBucket{
+							operatorLoc: q.loc(),
+							expression:  nextOp.whereClause,
+							queries:     make([]*query, len(nextOp.dependentPaths)),
+							results:     newResults(),
+						}
+
+						for i, p := range nextOp.dependentPaths {
+							bucket.queries[i] = newQuery(p)
+							bucket.queries[i].pos = q.loc()
+							bucket.queries[i].start = q.loc()
+							bucket.queries[i].captureEndValue = true
+						}
+						q.buckets.push(bucket)
+					}
+				}
+
+			}
+		}
+	}
+
+	if q.loc() == len(q.operators)+q.start && q.loc() <= curLocation {
+		if q.captureEndValue {
+			q.firstType = i.typ
+			q.buffer.Write(i.val)
+		}
+		q.valLoc = *e.location.clone()
+		return pathEndValue
+	}
+
+	if q.loc() < -1 {
+		return nil
+	} else {
+		return pathMatchOp
+	}
+}
+
+func pathEndValue(q *query, e *Eval, i *Item) queryStateFn {
+	if e.location.len()-1 >= q.loc() {
+		if q.captureEndValue {
+			q.buffer.Write(i.val)
+		}
+	} else {
+		r := &Result{Keys: q.valLoc.toArray()}
+		if q.buffer.Len() > 0 {
+			val := make([]byte, q.buffer.Len())
+			copy(val, q.buffer.Bytes())
+			r.Value = val
+
+			switch q.firstType {
+			case jsonBraceLeft:
+				r.Type = JsonObject
+			case jsonString:
+				r.Type = JsonString
+			case jsonBracketLeft:
+				r.Type = JsonArray
+			case jsonNull:
+				r.Type = JsonNull
+			case jsonBool:
+				r.Type = JsonBool
+			case jsonNumber:
+				r.Type = JsonNumber
+			default:
+				r.Type = -1
+			}
+		}
+
+		if q.buckets.len() == 0 {
+			q.resultQueue.push(r)
+		} else {
+			b, _ := q.buckets.peek()
+			b.(exprBucket).results.push(r)
+		}
+
+		q.valLoc = *newStack()
+		q.buffer.Truncate(0)
+		q.pos -= 1
+		return pathMatchOp
+	}
+	return pathEndValue
+}
+
+func (b *exprBucket) evaluate() (bool, error) {
+	values := make(map[string]Item)
+	for _, q := range b.queries {
+		result := q.resultQueue.Pop()
+		if result != nil {
+			t, err := getJsonTokenType(result.Value)
+			if err != nil {
+				return false, err
+			}
+			i := Item{
+				typ: t,
+				val: result.Value,
+			}
+			values[q.Path.stringValue] = i
+		}
+	}
+
+	res, err := evaluatePostFix(b.expression, values)
+	if err != nil {
+		return false, err
+	}
+	res_bool, ok := res.(bool)
+	if !ok {
+		return false, fmt.Errorf(exprErrorFinalValueNotBool, res)
+	}
+	return res_bool, nil
+}
+
+func itemMatchOperator(loc interface{}, i *Item, op *operator) bool {
+	topBytes, isKey := loc.([]byte)
+	topInt, isIndex := loc.(int)
+	if isKey {
+		switch op.typ {
+		case opTypeNameWild:
+			return true
+		case opTypeName, opTypeNameList:
+			_, found := op.keyStrings[string(topBytes)]
+			return found
+		}
+	} else if isIndex {
+		switch op.typ {
+		case opTypeIndexWild:
+			return true
+		case opTypeIndex, opTypeIndexRange:
+			return topInt >= op.indexStart && (!op.hasIndexEnd || topInt <= op.indexEnd)
+		}
+	}
+	return false
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/eval_states.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/eval_states.go b/cli/vendor/github.com/NodePrime/jsonpath/eval_states.go
new file mode 100644
index 0000000..16db87e
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/eval_states.go
@@ -0,0 +1,193 @@
+package jsonpath
+
+import (
+	"errors"
+	"fmt"
+)
+
+func evalRoot(e *Eval, i *Item) evalStateFn {
+	switch i.typ {
+	case jsonBraceLeft:
+		e.levelStack.push(i.typ)
+		return evalObjectAfterOpen
+	case jsonBracketLeft:
+		e.levelStack.push(i.typ)
+		return evalArrayAfterOpen
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func evalObjectAfterOpen(e *Eval, i *Item) evalStateFn {
+	switch i.typ {
+	case jsonKey:
+		c := i.val[1 : len(i.val)-1]
+		if e.copyValues {
+			d := make([]byte, len(c))
+			copy(d, c)
+			c = d
+		}
+		e.nextKey = c
+		return evalObjectColon
+	case jsonBraceRight:
+		return rightBraceOrBracket(e)
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func evalObjectColon(e *Eval, i *Item) evalStateFn {
+	switch i.typ {
+	case jsonColon:
+		return evalObjectValue
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+
+	return nil
+}
+
+func evalObjectValue(e *Eval, i *Item) evalStateFn {
+	e.location.push(e.nextKey)
+
+	switch i.typ {
+	case jsonNull, jsonNumber, jsonString, jsonBool:
+		return evalObjectAfterValue
+	case jsonBraceLeft:
+		e.levelStack.push(i.typ)
+		return evalObjectAfterOpen
+	case jsonBracketLeft:
+		e.levelStack.push(i.typ)
+		return evalArrayAfterOpen
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func evalObjectAfterValue(e *Eval, i *Item) evalStateFn {
+	e.location.pop()
+	switch i.typ {
+	case jsonComma:
+		return evalObjectAfterOpen
+	case jsonBraceRight:
+		return rightBraceOrBracket(e)
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func rightBraceOrBracket(e *Eval) evalStateFn {
+	e.levelStack.pop()
+
+	lowerTyp, ok := e.levelStack.peek()
+	if !ok {
+		return evalRootEnd
+	} else {
+		switch lowerTyp {
+		case jsonBraceLeft:
+			return evalObjectAfterValue
+		case jsonBracketLeft:
+			return evalArrayAfterValue
+		}
+	}
+	return nil
+}
+
+func evalArrayAfterOpen(e *Eval, i *Item) evalStateFn {
+	e.prevIndex = -1
+
+	switch i.typ {
+	case jsonNull, jsonNumber, jsonString, jsonBool, jsonBraceLeft, jsonBracketLeft:
+		return evalArrayValue(e, i)
+	case jsonBracketRight:
+		setPrevIndex(e)
+		return rightBraceOrBracket(e)
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func evalArrayValue(e *Eval, i *Item) evalStateFn {
+	e.prevIndex++
+	e.location.push(e.prevIndex)
+
+	switch i.typ {
+	case jsonNull, jsonNumber, jsonString, jsonBool:
+		return evalArrayAfterValue
+	case jsonBraceLeft:
+		e.levelStack.push(i.typ)
+		return evalObjectAfterOpen
+	case jsonBracketLeft:
+		e.levelStack.push(i.typ)
+		return evalArrayAfterOpen
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func evalArrayAfterValue(e *Eval, i *Item) evalStateFn {
+	switch i.typ {
+	case jsonComma:
+		if val, ok := e.location.pop(); ok {
+			if valIndex, ok := val.(int); ok {
+				e.prevIndex = valIndex
+			}
+		}
+		return evalArrayValue
+	case jsonBracketRight:
+		e.location.pop()
+		setPrevIndex(e)
+		return rightBraceOrBracket(e)
+	case jsonError:
+		return evalError(e, i)
+	default:
+		e.Error = errors.New(UnexpectedToken)
+	}
+	return nil
+}
+
+func setPrevIndex(e *Eval) {
+	e.prevIndex = -1
+	peeked, ok := e.location.peek()
+	if ok {
+		if peekedIndex, intOk := peeked.(int); intOk {
+			e.prevIndex = peekedIndex
+		}
+	}
+}
+
+func evalRootEnd(e *Eval, i *Item) evalStateFn {
+	if i.typ != jsonEOF {
+		if i.typ == jsonError {
+			evalError(e, i)
+		} else {
+			e.Error = errors.New(BadStructure)
+		}
+	}
+	return nil
+}
+
+func evalError(e *Eval, i *Item) evalStateFn {
+	e.Error = fmt.Errorf("%s at byte index %d", string(i.val), i.pos)
+	return nil
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/eval_test.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/eval_test.go b/cli/vendor/github.com/NodePrime/jsonpath/eval_test.go
new file mode 100644
index 0000000..bc391af
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/eval_test.go
@@ -0,0 +1,101 @@
+package jsonpath
+
+import (
+	"strings"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+type test struct {
+	name     string
+	json     string
+	path     string
+	expected []Result
+}
+
+var tests = []test{
+	test{`key selection`, `{"aKey":32}`, `$.aKey+`, []Result{newResult(`32`, JsonNumber, `aKey`)}},
+	test{`nested key selection`, `{"aKey":{"bKey":32}}`, `$.aKey+`, []Result{newResult(`{"bKey":32}`, JsonObject, `aKey`)}},
+	test{`empty array`, `{"aKey":[]}`, `$.aKey+`, []Result{newResult(`[]`, JsonArray, `aKey`)}},
+	test{`multiple same-level keys, weird spacing`, `{    "aKey" 	: true ,    "bKey":  [	1 , 2	], "cKey" 	: true		} `, `$.bKey+`, []Result{newResult(`[1,2]`, JsonArray, `bKey`)}},
+
+	test{`array index selection`, `{"aKey":[123,456]}`, `$.aKey[1]+`, []Result{newResult(`456`, JsonNumber, `aKey`, 1)}},
+	test{`array wild index selection`, `{"aKey":[123,456]}`, `$.aKey[*]+`, []Result{newResult(`123`, JsonNumber, `aKey`, 0), newResult(`456`, JsonNumber, `aKey`, 1)}},
+	test{`array range index selection`, `{"aKey":[11,22,33,44]}`, `$.aKey[1:3]+`, []Result{newResult(`22`, JsonNumber, `aKey`, 1), newResult(`33`, JsonNumber, `aKey`, 2)}},
+	test{`array range (no index) selection`, `{"aKey":[11,22,33,44]}`, `$.aKey[1:1]+`, []Result{}},
+	test{`array range (no upper bound) selection`, `{"aKey":[11,22,33]}`, `$.aKey[1:]+`, []Result{newResult(`22`, JsonNumber, `aKey`, 1), newResult(`33`, JsonNumber, `aKey`, 2)}},
+
+	test{`empty array - try selection`, `{"aKey":[]}`, `$.aKey[1]+`, []Result{}},
+	test{`null selection`, `{"aKey":[null]}`, `$.aKey[0]+`, []Result{newResult(`null`, JsonNull, `aKey`, 0)}},
+	test{`empty object`, `{"aKey":{}}`, `$.aKey+`, []Result{newResult(`{}`, JsonObject, `aKey`)}},
+	test{`object w/ height=2`, `{"aKey":{"bKey":32}}`, `$.aKey.bKey+`, []Result{newResult(`32`, JsonNumber, `aKey`, `bKey`)}},
+	test{`array of multiple types`, `{"aKey":[1,{"s":true},"asdf"]}`, `$.aKey[1]+`, []Result{newResult(`{"s":true}`, JsonObject, `aKey`, 1)}},
+	test{`nested array selection`, `{"aKey":{"bKey":[123,456]}}`, `$.aKey.bKey+`, []Result{newResult(`[123,456]`, JsonArray, `aKey`, `bKey`)}},
+	test{`nested array`, `[[[[[]], [true, false, []]]]]`, `$[0][0][1][2]+`, []Result{newResult(`[]`, JsonArray, 0, 0, 1, 2)}},
+	test{`index of array selection`, `{"aKey":{"bKey":[123, 456, 789]}}`, `$.aKey.bKey[1]+`, []Result{newResult(`456`, JsonNumber, `aKey`, `bKey`, 1)}},
+	test{`index of array selection (more than one)`, `{"aKey":{"bKey":[123,456]}}`, `$.aKey.bKey[1]+`, []Result{newResult(`456`, JsonNumber, `aKey`, `bKey`, 1)}},
+	test{`multi-level object/array`, `{"1Key":{"aKey": null, "bKey":{"trash":[1,2]}, "cKey":[123,456] }, "2Key":false}`, `$.1Key.bKey.trash[0]+`, []Result{newResult(`1`, JsonNumber, `1Key`, `bKey`, `trash`, 0)}},
+	test{`multi-level array`, `{"aKey":[true,false,null,{"michael":[5,6,7]}, ["s", "3"] ]}`, `$.*[*].michael[1]+`, []Result{newResult(`6`, JsonNumber, `aKey`, 3, `michael`, 1)}},
+	test{`multi-level array 2`, `{"aKey":[true,false,null,{"michael":[5,6,7]}, ["s", "3"] ]}`, `$.*[*][1]+`, []Result{newResult(`"3"`, JsonString, `aKey`, 4, 1)}},
+
+	test{`evaluation literal equality`, `{"items":[ {"name":"alpha", "value":11}]}`, `$.items[*]?("bravo" == "bravo").value+`, []Result{newResult(`11`, JsonNumber, `items`, 0, `value`)}},
+	test{`evaluation based on string equal to path value`, `{"items":[ {"name":"alpha", "value":11}, {"name":"bravo", "value":22}, {"name":"charlie", "value":33} ]}`, `$.items[*]?(@.name == "bravo").value+`, []Result{newResult(`22`, JsonNumber, `items`, 1, `value`)}},
+}
+
+func TestPathQuery(t *testing.T) {
+	as := assert.New(t)
+
+	for _, t := range tests {
+		paths, err := ParsePaths(t.path)
+		if as.NoError(err) {
+			eval, err := EvalPathsInBytes([]byte(t.json), paths)
+			if as.NoError(err, "Testing: %s", t.name) {
+				res := toResultArray(eval)
+				if as.NoError(eval.Error) {
+					as.EqualValues(t.expected, res, "Testing of %q", t.name)
+				}
+			}
+
+			eval_reader, err := EvalPathsInReader(strings.NewReader(t.json), paths)
+			if as.NoError(err, "Testing: %s", t.name) {
+				res := toResultArray(eval_reader)
+				if as.NoError(eval.Error) {
+					as.EqualValues(t.expected, res, "Testing of %q", t.name)
+				}
+			}
+		}
+	}
+}
+
+func newResult(value string, typ int, keys ...interface{}) Result {
+	keysChanged := make([]interface{}, len(keys))
+	for i, k := range keys {
+		switch v := k.(type) {
+		case string:
+			keysChanged[i] = []byte(v)
+		default:
+			keysChanged[i] = v
+		}
+	}
+
+	return Result{
+		Value: []byte(value),
+		Keys:  keysChanged,
+		Type:  typ,
+	}
+}
+
+func toResultArray(e *Eval) []Result {
+	vals := make([]Result, 0)
+	for {
+		if r, ok := e.Next(); ok {
+			if r != nil {
+				vals = append(vals, *r)
+			}
+		} else {
+			break
+		}
+	}
+	return vals
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/expression.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/expression.go b/cli/vendor/github.com/NodePrime/jsonpath/expression.go
new file mode 100644
index 0000000..fd6d192
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/expression.go
@@ -0,0 +1,429 @@
+package jsonpath
+
+import (
+	"errors"
+	"fmt"
+	"math"
+	"reflect"
+	"strconv"
+)
+
+const (
+	exprErrorMismatchedParens   = "Mismatched parentheses"
+	exprErrorBadExpression      = "Bad Expression"
+	exprErrorFinalValueNotBool  = "Expression evaluated to a non-bool: %v"
+	exprErrorNotEnoughOperands  = "Not enough operands for operation %q"
+	exprErrorValueNotFound      = "Value for %q not found"
+	exprErrorBadValue           = "Bad value %q for type %q"
+	exprErrorPathValueNotScalar = "Path value must be scalar value"
+	exprErrorBadOperandType     = "Operand type expected to be %q for operation %q"
+)
+
+type exprErrorBadTypeComparison struct {
+	valueType    string
+	expectedType string
+}
+
+func (e exprErrorBadTypeComparison) Error() string {
+	return fmt.Sprintf("Type %s cannot be compared to type %s", e.valueType, e.expectedType)
+}
+
+// Lowest priority = lowest #
+var opa = map[int]struct {
+	prec   int
+	rAssoc bool
+}{
+	exprOpAnd:     {1, false},
+	exprOpOr:      {1, false},
+	exprOpEq:      {2, false},
+	exprOpNeq:     {2, false},
+	exprOpLt:      {3, false},
+	exprOpLe:      {3, false},
+	exprOpGt:      {3, false},
+	exprOpGe:      {3, false},
+	exprOpPlus:    {4, false},
+	exprOpMinus:   {4, false},
+	exprOpSlash:   {5, false},
+	exprOpStar:    {5, false},
+	exprOpPercent: {5, false},
+	exprOpHat:     {6, false},
+	exprOpNot:     {7, true},
+	exprOpPlusUn:  {7, true},
+	exprOpMinusUn: {7, true},
+}
+
+// Shunting-yard Algorithm (infix -> postfix)
+// http://rosettacode.org/wiki/Parsing/Shunting-yard_algorithm#Go
+func infixToPostFix(items []Item) (out []Item, err error) {
+	stack := newStack()
+
+	for _, i := range items {
+		switch i.typ {
+		case exprParenLeft:
+			stack.push(i) // push "(" to stack
+		case exprParenRight:
+			found := false
+			for {
+				// pop item ("(" or operator) from stack
+				op_interface, ok := stack.pop()
+				if !ok {
+					return nil, errors.New(exprErrorMismatchedParens)
+				}
+				op := op_interface.(Item)
+				if op.typ == exprParenLeft {
+					found = true
+					break // discard "("
+				}
+				out = append(out, op) // add operator to result
+			}
+			if !found {
+				return nil, errors.New(exprErrorMismatchedParens)
+			}
+		default:
+			if o1, isOp := opa[i.typ]; isOp {
+				// token is an operator
+				for stack.len() > 0 {
+					// consider top item on stack
+					op_int, _ := stack.peek()
+					op := op_int.(Item)
+					if o2, isOp := opa[op.typ]; !isOp || o1.prec > o2.prec ||
+						o1.prec == o2.prec && o1.rAssoc {
+						break
+					}
+					// top item is an operator that needs to come off
+					stack.pop()           // pop it
+					out = append(out, op) // add it to result
+				}
+				// push operator (the new one) to stack
+				stack.push(i)
+			} else { // token is an operand
+				out = append(out, i) // add operand to result
+			}
+		}
+	}
+	// drain stack to result
+	for stack.len() > 0 {
+		op_int, _ := stack.pop()
+		op := op_int.(Item)
+		if op.typ == exprParenLeft {
+			return nil, errors.New(exprErrorMismatchedParens)
+		}
+		out = append(out, op)
+	}
+	return
+}
+
+func evaluatePostFix(postFixItems []Item, pathValues map[string]Item) (interface{}, error) {
+	s := newStack()
+
+	if len(postFixItems) == 0 {
+		return false, errors.New(exprErrorBadExpression)
+	}
+
+	for _, item := range postFixItems {
+		switch item.typ {
+
+		// VALUES
+		case exprBool:
+			val, err := strconv.ParseBool(string(item.val))
+			if err != nil {
+				return false, fmt.Errorf(exprErrorBadValue, string(item.val), exprTokenNames[exprBool])
+			}
+			s.push(val)
+		case exprNumber:
+			val, err := strconv.ParseFloat(string(item.val), 64)
+			if err != nil {
+				return false, fmt.Errorf(exprErrorBadValue, string(item.val), exprTokenNames[exprNumber])
+			}
+			s.push(val)
+		case exprPath:
+			// TODO: Handle datatypes of JSON
+			i, ok := pathValues[string(item.val)]
+			if !ok {
+				return false, fmt.Errorf(exprErrorValueNotFound, string(item.val))
+			}
+			switch i.typ {
+			case jsonNull:
+				s.push(nil)
+			case jsonNumber:
+				val_float, err := strconv.ParseFloat(string(i.val), 64)
+				if err != nil {
+					return false, fmt.Errorf(exprErrorBadValue, string(item.val), jsonTokenNames[jsonNumber])
+				}
+				s.push(val_float)
+			case jsonKey, jsonString:
+				s.push(i.val)
+			default:
+				return false, fmt.Errorf(exprErrorPathValueNotScalar)
+			}
+		case exprString:
+			s.push(item.val)
+		case exprNull:
+			s.push(nil)
+
+		// OPERATORS
+		case exprOpAnd:
+			a, b, err := take2Bool(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(a && b)
+		case exprOpEq:
+			p, ok := s.peek()
+			if !ok {
+				return false, fmt.Errorf(exprErrorNotEnoughOperands, exprTokenNames[item.typ])
+			}
+			switch p.(type) {
+			case nil:
+				err := take2Null(s, item.typ)
+				if err != nil {
+					return false, err
+				} else {
+					s.push(true)
+				}
+			case bool:
+				a, b, err := take2Bool(s, item.typ)
+				if err != nil {
+					return false, err
+				}
+				s.push(a == b)
+			case float64:
+				a, b, err := take2Float(s, item.typ)
+				if err != nil {
+					return false, err
+				}
+				s.push(a == b)
+			case []byte:
+				a, b, err := take2ByteSlice(s, item.typ)
+				if err != nil {
+					return false, err
+				}
+				s.push(byteSlicesEqual(a, b))
+			}
+		case exprOpNeq:
+			p, ok := s.peek()
+			if !ok {
+				return false, fmt.Errorf(exprErrorNotEnoughOperands, exprTokenNames[item.typ])
+			}
+			switch p.(type) {
+			case nil:
+				err := take2Null(s, item.typ)
+				if err != nil {
+					return true, err
+				} else {
+					s.push(false)
+				}
+			case bool:
+				a, b, err := take2Bool(s, item.typ)
+				if err != nil {
+					return false, err
+				}
+				s.push(a != b)
+			case float64:
+				a, b, err := take2Float(s, item.typ)
+				if err != nil {
+					return false, err
+				}
+				s.push(a != b)
+			case []byte:
+				a, b, err := take2ByteSlice(s, item.typ)
+				if err != nil {
+					return false, err
+				}
+				s.push(!byteSlicesEqual(a, b))
+			}
+		case exprOpNot:
+			a, err := take1Bool(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(!a)
+		case exprOpOr:
+			a, b, err := take2Bool(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(a || b)
+		case exprOpGt:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(b > a)
+		case exprOpGe:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(b >= a)
+		case exprOpLt:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(b < a)
+		case exprOpLe:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(b <= a)
+		case exprOpPlus:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+			s.push(b + a)
+		case exprOpPlusUn:
+			a, err := take1Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+			s.push(a)
+		case exprOpMinus:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+			s.push(b - a)
+		case exprOpMinusUn:
+			a, err := take1Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+			s.push(0 - a)
+		case exprOpSlash:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			if a == 0.0 {
+				return false, errors.New("Cannot divide by zero")
+			}
+			s.push(b / a)
+		case exprOpStar:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(b * a)
+		case exprOpPercent:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(math.Mod(b, a))
+		case exprOpHat:
+			a, b, err := take2Float(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+
+			s.push(math.Pow(b, a))
+		case exprOpExclam:
+			a, err := take1Bool(s, item.typ)
+			if err != nil {
+				return false, err
+			}
+			s.push(!a)
+		// Other
+		default:
+			return false, fmt.Errorf("Token not supported in evaluator: %v", exprTokenNames[item.typ])
+		}
+	}
+
+	if s.len() != 1 {
+		return false, fmt.Errorf(exprErrorBadExpression)
+	}
+	end_int, _ := s.pop()
+	return end_int, nil
+}
+
+func take1Bool(s *stack, op int) (bool, error) {
+	t := exprBool
+	val, ok := s.pop()
+	if !ok {
+		return false, fmt.Errorf(exprErrorNotEnoughOperands, exprTokenNames[op])
+	}
+
+	b, ok := val.(bool)
+	if !ok {
+		return false, exprErrorBadTypeComparison{exprTokenNames[t], (reflect.TypeOf(val)).String()}
+	}
+	return b, nil
+}
+
+func take2Bool(s *stack, op int) (bool, bool, error) {
+	a, a_err := take1Bool(s, op)
+	b, b_err := take1Bool(s, op)
+	return a, b, firstError(a_err, b_err)
+}
+
+func take1Float(s *stack, op int) (float64, error) {
+	t := exprNumber
+	val, ok := s.pop()
+	if !ok {
+		return 0.0, fmt.Errorf(exprErrorNotEnoughOperands, exprTokenNames[op])
+	}
+
+	b, ok := val.(float64)
+	if !ok {
+		return 0.0, exprErrorBadTypeComparison{exprTokenNames[t], (reflect.TypeOf(val)).String()}
+	}
+	return b, nil
+}
+
+func take2Float(s *stack, op int) (float64, float64, error) {
+	a, a_err := take1Float(s, op)
+	b, b_err := take1Float(s, op)
+	return a, b, firstError(a_err, b_err)
+}
+
+func take1ByteSlice(s *stack, op int) ([]byte, error) {
+	t := exprNumber
+	val, ok := s.pop()
+	if !ok {
+		return nil, fmt.Errorf(exprErrorNotEnoughOperands, exprTokenNames[op])
+	}
+
+	b, ok := val.([]byte)
+	if !ok {
+		return nil, exprErrorBadTypeComparison{exprTokenNames[t], (reflect.TypeOf(val)).String()}
+	}
+	return b, nil
+}
+
+func take2ByteSlice(s *stack, op int) ([]byte, []byte, error) {
+	a, a_err := take1ByteSlice(s, op)
+	b, b_err := take1ByteSlice(s, op)
+	return a, b, firstError(a_err, b_err)
+}
+
+func take1Null(s *stack, op int) error {
+	t := exprNull
+	val, ok := s.pop()
+	if !ok {
+		return fmt.Errorf(exprErrorNotEnoughOperands, exprTokenNames[op])
+	}
+
+	if v := reflect.TypeOf(val); v != nil {
+		return exprErrorBadTypeComparison{exprTokenNames[t], v.String()}
+	}
+	return nil
+}
+
+func take2Null(s *stack, op int) error {
+	a_err := take1Null(s, op)
+	b_err := take1Null(s, op)
+	return firstError(a_err, b_err)
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/expression_states.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/expression_states.go b/cli/vendor/github.com/NodePrime/jsonpath/expression_states.go
new file mode 100644
index 0000000..81ab06d
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/expression_states.go
@@ -0,0 +1,287 @@
+package jsonpath
+
+const (
+	exprError = iota
+	exprEOF
+	exprParenLeft
+	exprParenRight
+	exprNumber
+	exprPath
+	exprBool
+	exprNull
+	exprString
+
+	exprOperators
+	exprOpEq
+	exprOpNeq
+	exprOpNot
+	exprOpLt
+	exprOpLe
+	exprOpGt
+	exprOpGe
+	exprOpAnd
+	exprOpOr
+	exprOpPlus
+	exprOpPlusUn
+	exprOpMinus
+	exprOpMinusUn
+	exprOpSlash
+	exprOpStar
+	exprOpHat
+	exprOpPercent
+	exprOpExclam
+)
+
+var exprTokenNames = map[int]string{
+	exprError: "error",
+	exprEOF:   "EOF",
+
+	exprParenLeft:  "(",
+	exprParenRight: ")",
+	exprNumber:     "number",
+	exprPath:       "path",
+	exprBool:       "bool",
+	exprNull:       "null",
+	exprString:     "string",
+	exprOpEq:       "==",
+	exprOpNeq:      "!=",
+	exprOpNot:      "!",
+	exprOpLt:       "<",
+	exprOpLe:       "<=",
+	exprOpGt:       ">",
+	exprOpGe:       ">=",
+	exprOpAnd:      "&&",
+	exprOpOr:       "||",
+	exprOpPlus:     "+",
+	exprOpPlusUn:   "(+)",
+	exprOpMinus:    "-",
+	exprOpMinusUn:  "(-)",
+	exprOpSlash:    "/",
+	exprOpStar:     "*",
+	exprOpHat:      "^",
+	exprOpPercent:  "%",
+	exprOpExclam:   "!",
+}
+
+var EXPRESSION = lexExprText
+
+func lexExprText(l lexer, state *intStack) stateFn {
+	ignoreSpaceRun(l)
+	cur := l.peek()
+	var next stateFn
+	switch cur {
+	case '(':
+		l.take()
+		state.push(exprParenLeft)
+		l.emit(exprParenLeft)
+		next = lexExprText
+	case ')':
+		if top, ok := state.peek(); ok && top != exprParenLeft {
+			next = l.errorf("Received %#U but has no matching (", cur)
+			break
+		}
+		state.pop()
+		l.take()
+		l.emit(exprParenRight)
+
+		next = lexOneValue
+	case '!':
+		l.take()
+		l.emit(exprOpNot)
+		next = lexExprText
+	case '+':
+		l.take()
+		l.emit(exprOpPlusUn)
+		next = lexExprText
+	case '-':
+		l.take()
+		l.emit(exprOpMinusUn)
+		next = lexExprText
+	case '@': //, '$': // Only support current key location
+		l.take()
+		takePath(l)
+		l.emit(exprPath)
+		next = lexOneValue
+	case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+		takeNumeric(l)
+		l.emit(exprNumber)
+		next = lexOneValue
+	case 't':
+		takeExactSequence(l, bytesTrue)
+		l.emit(exprBool)
+		next = lexOneValue
+	case 'f':
+		takeExactSequence(l, bytesFalse)
+		l.emit(exprBool)
+		next = lexOneValue
+	case 'n':
+		takeExactSequence(l, bytesNull)
+		l.emit(exprNull)
+		next = lexOneValue
+	case '"':
+		err := l.takeString()
+		if err != nil {
+			return l.errorf("Could not take string because %q", err)
+		}
+		l.emit(exprString)
+		next = lexOneValue
+	case eof:
+		l.emit(exprEOF)
+		// next = nil
+	default:
+		return l.errorf("Unrecognized sequence in expression: %#U", cur)
+	}
+	return next
+}
+
+func lexOneValue(l lexer, state *intStack) stateFn {
+	var next stateFn
+	cur := l.peek()
+	switch cur {
+	case '+':
+		l.take()
+		l.emit(exprOpPlus)
+		next = lexExprText
+	case '-':
+		l.take()
+		l.emit(exprOpMinus)
+		next = lexExprText
+	case '*':
+		l.take()
+		l.emit(exprOpStar)
+		next = lexExprText
+	case '/':
+		l.take()
+		l.emit(exprOpSlash)
+		next = lexExprText
+	case '%':
+		l.take()
+		l.emit(exprOpPercent)
+		next = lexExprText
+	case '^':
+		l.take()
+		l.emit(exprOpHat)
+		next = lexExprText
+	case '<':
+		l.take()
+		cur = l.peek()
+		if cur == '=' {
+			l.take()
+			l.emit(exprOpLe)
+		} else {
+			l.emit(exprOpLt)
+		}
+		next = lexExprText
+	case '>':
+		l.take()
+		cur = l.peek()
+		if cur == '=' {
+			l.take()
+			l.emit(exprOpGe)
+		} else {
+			l.emit(exprOpGt)
+		}
+		next = lexExprText
+	case '&':
+		l.take()
+		cur = l.take()
+		if cur != '&' {
+			return l.errorf("Expected double & instead of %#U", cur)
+		}
+		l.emit(exprOpAnd)
+		next = lexExprText
+	case '|':
+		l.take()
+		cur = l.take()
+		if cur != '|' {
+			return l.errorf("Expected double | instead of %#U", cur)
+		}
+		l.emit(exprOpOr)
+		next = lexExprText
+	case '=':
+		l.take()
+		cur = l.take()
+		if cur != '=' {
+			return l.errorf("Expected double = instead of %#U", cur)
+		}
+		l.emit(exprOpEq)
+		next = lexExprText
+	case '!':
+		l.take()
+		cur = l.take()
+		if cur != '=' {
+			return l.errorf("Expected = for != instead of %#U", cur)
+		}
+		l.emit(exprOpNeq)
+		next = lexExprText
+	case ')':
+		if top, ok := state.peek(); ok && top != exprParenLeft {
+			next = l.errorf("Received %#U but has no matching (", cur)
+			break
+		}
+		state.pop()
+		l.take()
+		l.emit(exprParenRight)
+
+		next = lexOneValue
+	case eof:
+		l.emit(exprEOF)
+	default:
+		return l.errorf("Unrecognized sequence in expression: %#U", cur)
+	}
+	return next
+}
+
+func takeNumeric(l lexer) {
+	takeDigits(l)
+	if l.peek() == '.' {
+		l.take()
+		takeDigits(l)
+	}
+	if l.peek() == 'e' || l.peek() == 'E' {
+		l.take()
+		if l.peek() == '+' || l.peek() == '-' {
+			l.take()
+			takeDigits(l)
+		} else {
+			takeDigits(l)
+		}
+	}
+}
+
+func takePath(l lexer) {
+	inQuotes := false
+	var prev int = 0
+	// capture until end of path - ugly
+takeLoop:
+	for {
+		cur := l.peek()
+		switch cur {
+		case '"':
+			if prev != '\\' {
+				inQuotes = !inQuotes
+			}
+			l.take()
+		case ' ':
+			if !inQuotes {
+				break takeLoop
+			}
+			l.take()
+		case eof:
+			break takeLoop
+		default:
+			l.take()
+		}
+
+		prev = cur
+	}
+}
+
+func lexExprEnd(l lexer, state *intStack) stateFn {
+	cur := l.take()
+	if cur != eof {
+		return l.errorf("Expected EOF but received %#U", cur)
+	}
+	l.emit(exprEOF)
+	return nil
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/expression_states_test.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/expression_states_test.go b/cli/vendor/github.com/NodePrime/jsonpath/expression_states_test.go
new file mode 100644
index 0000000..2861c30
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/expression_states_test.go
@@ -0,0 +1,40 @@
+package jsonpath
+
+import (
+	"fmt"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+var expressionTests = []lexTest{
+	{"empty", "", []int{exprEOF}},
+	{"spaces", "     \t\r\n", []int{exprEOF}},
+	{"numbers", " 1.3e10 ", []int{exprNumber, exprEOF}},
+	// {"numbers with signs", "+1 -2.23", []int{exprNumber, exprOpPlus, exprNumber, exprEOF}},
+	{"paths", " @.aKey[2].bKey ", []int{exprPath, exprEOF}},
+	{"addition with mixed sign", "4+-19", []int{exprNumber, exprOpPlus, exprOpMinusUn, exprNumber, exprEOF}},
+	{"addition", "4+19", []int{exprNumber, exprOpPlus, exprNumber, exprEOF}},
+	{"subtraction", "4-19", []int{exprNumber, exprOpMinus, exprNumber, exprEOF}},
+
+	{"parens", "( () + () )", []int{exprParenLeft, exprParenLeft, exprParenRight, exprOpPlus, exprParenLeft, exprParenRight, exprParenRight, exprEOF}},
+	{"equals", "true ==", []int{exprBool, exprOpEq, exprEOF}},
+	{"numerical comparisons", "3.4 <", []int{exprNumber, exprOpLt, exprEOF}},
+}
+
+func TestExpressionTokens(t *testing.T) {
+	as := assert.New(t)
+	for _, test := range expressionTests {
+		lexer := NewSliceLexer([]byte(test.input), EXPRESSION)
+		items := readerToArray(lexer)
+		types := itemsToTypes(items)
+
+		for _, i := range items {
+			if i.typ == exprError {
+				fmt.Println(string(i.val))
+			}
+		}
+
+		as.EqualValues(types, test.tokenTypes, "Testing of %s: \nactual\n\t%+v\nexpected\n\t%v", test.name, typesDescription(types, exprTokenNames), typesDescription(test.tokenTypes, exprTokenNames))
+	}
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/expression_test.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/expression_test.go b/cli/vendor/github.com/NodePrime/jsonpath/expression_test.go
new file mode 100644
index 0000000..fca4903
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/expression_test.go
@@ -0,0 +1,226 @@
+package jsonpath
+
+import (
+	"strings"
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+var exprTests = []struct {
+	input         string
+	fields        map[string]Item
+	expectedValue interface{}
+}{
+	// &&
+	{"true && true", nil, true},
+	{"false && true", nil, false},
+	{"false && false", nil, false},
+
+	// ||
+	{"true || true", nil, true},
+	{"true || false", nil, true},
+	{"false ||  false", nil, false},
+
+	// LT
+	{"10 < 20", nil, true},
+	{"10 < 10", nil, false},
+	{"100 < 20", nil, false},
+	{"@a < 50", map[string]Item{"@a": genValue(`49`, jsonNumber)}, true},
+	{"@a < 50", map[string]Item{"@a": genValue(`50`, jsonNumber)}, false},
+	{"@a < 50", map[string]Item{"@a": genValue(`51`, jsonNumber)}, false},
+
+	// LE
+	{"10 <= 20", nil, true},
+	{"10 <= 10", nil, true},
+	{"100 <= 20", nil, false},
+	{"@a <= 54", map[string]Item{"@a": genValue(`53`, jsonNumber)}, true},
+	{"@a <= 54", map[string]Item{"@a": genValue(`54`, jsonNumber)}, true},
+	{"@a <= 54", map[string]Item{"@a": genValue(`55`, jsonNumber)}, false},
+
+	// GT
+	{"30 > 20", nil, true},
+	{"20 > 20", nil, false},
+	{"10 > 20", nil, false},
+	{"@a > 50", map[string]Item{"@a": genValue(`49`, jsonNumber)}, false},
+	{"@a > 50", map[string]Item{"@a": genValue(`50`, jsonNumber)}, false},
+	{"@a > 50", map[string]Item{"@a": genValue(`51`, jsonNumber)}, true},
+
+	// GE
+	{"30 >= 20", nil, true},
+	{"20 >= 20", nil, true},
+	{"10 >= 20", nil, false},
+	{"@a >= 50", map[string]Item{"@a": genValue(`49`, jsonNumber)}, false},
+	{"@a >= 50", map[string]Item{"@a": genValue(`50`, jsonNumber)}, true},
+	{"@a >= 50", map[string]Item{"@a": genValue(`51`, jsonNumber)}, true},
+
+	// EQ
+	{"20 == 20", nil, true},
+	{"20 == 21", nil, false},
+	{"true == true", nil, true},
+	{"true == false", nil, false},
+	{"@a == @b", map[string]Item{"@a": genValue(`"one"`, jsonString), "@b": genValue(`"one"`, jsonString)}, true},
+	{"@a == @b", map[string]Item{"@a": genValue(`"one"`, jsonString), "@b": genValue(`"two"`, jsonString)}, false},
+	{`"fire" == "fire"`, nil, true},
+	{`"fire" == "water"`, nil, false},
+	{`@a == "toronto"`, map[string]Item{"@a": genValue(`"toronto"`, jsonString)}, true},
+	{`@a == "toronto"`, map[string]Item{"@a": genValue(`"los angeles"`, jsonString)}, false},
+	{`@a == 3.4`, map[string]Item{"@a": genValue(`3.4`, jsonNumber)}, true},
+	{`@a == 3.4`, map[string]Item{"@a": genValue(`3.41`, jsonNumber)}, false},
+	{`@a == null`, map[string]Item{"@a": genValue(`null`, jsonNull)}, true},
+
+	// NEQ
+	{"20 != 20", nil, false},
+	{"20 != 21", nil, true},
+	{"true != true", nil, false},
+	{"true != false", nil, true},
+	{"@a != @b", map[string]Item{"@a": genValue(`"one"`, jsonString), "@b": genValue(`"one"`, jsonString)}, false},
+	{"@a != @b", map[string]Item{"@a": genValue(`"one"`, jsonString), "@b": genValue(`"two"`, jsonString)}, true},
+	{`"fire" != "fire"`, nil, false},
+	{`"fire" != "water"`, nil, true},
+	{`@a != "toronto"`, map[string]Item{"@a": genValue(`"toronto"`, jsonString)}, false},
+	{`@a != "toronto"`, map[string]Item{"@a": genValue(`"los angeles"`, jsonString)}, true},
+	{`@a != 3.4`, map[string]Item{"@a": genValue(`3.4`, jsonNumber)}, false},
+	{`@a != 3.4`, map[string]Item{"@a": genValue(`3.41`, jsonNumber)}, true},
+	{`@a != null`, map[string]Item{"@a": genValue(`null`, jsonNull)}, false},
+
+	// Plus
+	{"20 + 7", nil, 27},
+	{"20 + 6.999999", nil, 26.999999},
+
+	// Minus
+	{"20 - 7", nil, 13},
+	{"20 - 7.11111", nil, 12.88889},
+
+	// Minus Unary
+	{"-27", nil, -27},
+	{"30 - -3", nil, 33},
+	{"30 + -3", nil, 27},
+
+	{"2 +++++ 3", nil, 5},
+	{"2+--3", nil, 5},
+	// Star
+	{"20 * 7", nil, 140},
+	{"20 * 6.999999", nil, 139.99998},
+	{"20 * -7", nil, -140},
+	{"-20 * -7", nil, 140},
+
+	// Slash
+	{"20 / 5", nil, 4},
+	{"20 / 6.999999 - 2.85714326531 <= 0.00000001", nil, true},
+
+	// Hat
+	{"7 ^ 4", nil, 2401},
+	{"2 ^ -2", nil, 0.25},
+	{"((7 ^ -4) - 0.00041649312) <= 0.0001", nil, true},
+
+	// Mod
+	{"7.5 % 4", nil, 3.5},
+	{"2 % -2", nil, 0},
+	{"11 % 22", nil, 11},
+
+	// Negate
+	{"!true", nil, false},
+	{"!false", nil, true},
+
+	// Mix
+	{"20 >= 20 || 2 == 2", nil, true},
+	{"20 > @.test && @.test < 13 && @.test > 1.99994", map[string]Item{"@.test": genValue(`10.23423`, jsonNumber)}, true},
+	{"20 > @.test && @.test < 13 && @.test > 1.99994", map[string]Item{"@.test": genValue(`15.3423`, jsonNumber)}, false},
+}
+
+func genValue(val string, typ int) Item {
+	return Item{
+		val: []byte(val),
+		typ: typ,
+	}
+}
+
+func TestExpressions(t *testing.T) {
+	as := assert.New(t)
+	emptyFields := map[string]Item{}
+
+	for _, test := range exprTests {
+		if test.fields == nil {
+			test.fields = emptyFields
+		}
+
+		lexer := NewSliceLexer([]byte(test.input), EXPRESSION)
+		items := readerToArray(lexer)
+		// trim EOF
+		items = items[0 : len(items)-1]
+		items_post, err := infixToPostFix(items)
+		if as.NoError(err, "Could not transform to postfix\nTest: %q", test.input) {
+			val, err := evaluatePostFix(items_post, test.fields)
+			if as.NoError(err, "Could not evaluate postfix\nTest Input: %q\nTest Values:%q\nError:%q", test.input, test.fields, err) {
+				as.EqualValues(test.expectedValue, val, "\nTest: %q\nActual: %v \nExpected %v\n", test.input, val, test.expectedValue)
+			}
+		}
+	}
+}
+
+var exprErrorTests = []struct {
+	input                  string
+	fields                 map[string]Item
+	expectedErrorSubstring string
+}{
+	{"@a == @b", map[string]Item{"@a": genValue(`"one"`, jsonString), "@b": genValue("3.4", jsonNumber)}, "cannot be compared"},
+	{")(", nil, "Mismatched parentheses"},
+	{")123", nil, "Mismatched parentheses"},
+	{"20 == null", nil, "cannot be compared"},
+	{`"toronto" == null`, nil, "cannot be compared"},
+	{`false == 20`, nil, "cannot be compared"},
+	{`"nick" == 20`, nil, "cannot be compared"},
+	{"20 != null", nil, "cannot be compared"},
+	{`"toronto" != null`, nil, "cannot be compared"},
+	{`false != 20`, nil, "cannot be compared"},
+	{`"nick" != 20`, nil, "cannot be compared"},
+	{``, nil, "Bad Expression"},
+	{`==`, nil, "Bad Expression"},
+	{`!=`, nil, "Not enough operands"},
+
+	{`!23`, nil, "cannot be compared"},
+	{`"nick" || true`, nil, "cannot be compared"},
+	{`"nick" >=  3.2`, nil, "cannot be compared"},
+	{`"nick" >3.2`, nil, "cannot be compared"},
+	{`"nick" <=  3.2`, nil, "cannot be compared"},
+	{`"nick" <  3.2`, nil, "cannot be compared"},
+	{`"nick" +  3.2`, nil, "cannot be compared"},
+	{`"nick" -  3.2`, nil, "cannot be compared"},
+	{`"nick" /  3.2`, nil, "cannot be compared"},
+	{`"nick" *  3.2`, nil, "cannot be compared"},
+	{`"nick" %  3.2`, nil, "cannot be compared"},
+	{`"nick"+`, nil, "cannot be compared"},
+	{`"nick"-`, nil, "cannot be compared"},
+	{`"nick"^3.2`, nil, "cannot be compared"},
+
+	{`@a == null`, map[string]Item{"@a": genValue(`3.41`, jsonNumber)}, "cannot be compared"},
+}
+
+func TestBadExpressions(t *testing.T) {
+	as := assert.New(t)
+	emptyFields := map[string]Item{}
+
+	for _, test := range exprErrorTests {
+		if test.fields == nil {
+			test.fields = emptyFields
+		}
+
+		lexer := NewSliceLexer([]byte(test.input), EXPRESSION)
+		items := readerToArray(lexer)
+		// trim EOF
+		items = items[0 : len(items)-1]
+		items_post, err := infixToPostFix(items)
+		if err != nil {
+			as.True(strings.Contains(err.Error(), test.expectedErrorSubstring), "Test Input: %q\nError %q does not contain %q", test.input, err.Error(), test.expectedErrorSubstring)
+			continue
+		}
+		if as.NoError(err, "Could not transform to postfix\nTest: %q", test.input) {
+			_, err := evaluatePostFix(items_post, test.fields)
+			if as.Error(err, "Could not evaluate postfix\nTest Input: %q\nTest Values:%q\nError:%s", test.input, test.fields, err) {
+				as.True(strings.Contains(err.Error(), test.expectedErrorSubstring), "Test Input: %q\nError %s does not contain %q", test.input, err.Error(), test.expectedErrorSubstring)
+			}
+
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/json_states.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/json_states.go b/cli/vendor/github.com/NodePrime/jsonpath/json_states.go
new file mode 100644
index 0000000..2c28d7c
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/json_states.go
@@ -0,0 +1,266 @@
+package jsonpath
+
+const (
+	jsonError = iota
+	jsonEOF
+
+	jsonBraceLeft
+	jsonBraceRight
+	jsonBracketLeft
+	jsonBracketRight
+	jsonColon
+	jsonComma
+	jsonNumber
+	jsonString
+	jsonNull
+	jsonKey
+	jsonBool
+)
+
+var trueBytes = []byte{'t', 'r', 'u', 'e'}
+var falseBytes = []byte{'f', 'a', 'l', 's', 'e'}
+var nullBytes = []byte{'n', 'u', 'l', 'l'}
+
+var jsonTokenNames = map[int]string{
+	jsonEOF:   "EOF",
+	jsonError: "ERROR",
+
+	jsonBraceLeft:    "{",
+	jsonBraceRight:   "}",
+	jsonBracketLeft:  "[",
+	jsonBracketRight: "]",
+	jsonColon:        ":",
+	jsonComma:        ",",
+	jsonNumber:       "NUMBER",
+	jsonString:       "STRING",
+	jsonNull:         "NULL",
+	jsonKey:          "KEY",
+	jsonBool:         "BOOL",
+}
+
+var JSON = lexJsonRoot
+
+func lexJsonRoot(l lexer, state *intStack) stateFn {
+	ignoreSpaceRun(l)
+	cur := l.peek()
+	var next stateFn
+	switch cur {
+	case '{':
+		next = stateJsonObjectOpen
+	case '[':
+		next = stateJsonArrayOpen
+	default:
+		next = l.errorf("Expected '{' or '[' at root of JSON instead of %#U", cur)
+	}
+	return next
+}
+
+func stateJsonObjectOpen(l lexer, state *intStack) stateFn {
+	cur := l.take()
+	if cur != '{' {
+		return l.errorf("Expected '{' as start of object instead of %#U", cur)
+	}
+	l.emit(jsonBraceLeft)
+	state.push(jsonBraceLeft)
+
+	return stateJsonObject
+}
+
+func stateJsonArrayOpen(l lexer, state *intStack) stateFn {
+	cur := l.take()
+	if cur != '[' {
+		return l.errorf("Expected '[' as start of array instead of %#U", cur)
+	}
+	l.emit(jsonBracketLeft)
+	state.push(jsonBracketLeft)
+
+	return stateJsonArray
+}
+
+func stateJsonObject(l lexer, state *intStack) stateFn {
+	var next stateFn
+	cur := l.peek()
+	switch cur {
+	case '}':
+		if top, ok := state.peek(); ok && top != jsonBraceLeft {
+			next = l.errorf("Received %#U but has no matching '{'", cur)
+			break
+		}
+		l.take()
+		l.emit(jsonBraceRight)
+		state.pop()
+		next = stateJsonAfterValue
+	case '"':
+		next = stateJsonKey
+	default:
+		next = l.errorf("Expected '}' or \" within an object instead of %#U", cur)
+	}
+	return next
+}
+
+func stateJsonArray(l lexer, state *intStack) stateFn {
+	var next stateFn
+	cur := l.peek()
+	switch cur {
+	case ']':
+		if top, ok := state.peek(); ok && top != jsonBracketLeft {
+			next = l.errorf("Received %#U but has no matching '['", cur)
+			break
+		}
+		l.take()
+		l.emit(jsonBracketRight)
+		state.pop()
+		next = stateJsonAfterValue
+	default:
+		next = stateJsonValue
+	}
+	return next
+}
+
+func stateJsonAfterValue(l lexer, state *intStack) stateFn {
+	cur := l.take()
+	top, ok := state.peek()
+	topVal := noValue
+	if ok {
+		topVal = top
+	}
+
+	switch cur {
+	case ',':
+		l.emit(jsonComma)
+		switch topVal {
+		case jsonBraceLeft:
+			return stateJsonKey
+		case jsonBracketLeft:
+			return stateJsonValue
+		case noValue:
+			return l.errorf("Found %#U outside of array or object", cur)
+		default:
+			return l.errorf("Unexpected character in lexer stack: %#U", cur)
+		}
+	case '}':
+		l.emit(jsonBraceRight)
+		state.pop()
+		switch topVal {
+		case jsonBraceLeft:
+			return stateJsonAfterValue
+		case jsonBracketLeft:
+			return l.errorf("Unexpected %#U in array", cur)
+		case noValue:
+			return stateJsonAfterRoot
+		}
+	case ']':
+		l.emit(jsonBracketRight)
+		state.pop()
+		switch topVal {
+		case jsonBraceLeft:
+			return l.errorf("Unexpected %#U in object", cur)
+		case jsonBracketLeft:
+			return stateJsonAfterValue
+		case noValue:
+			return stateJsonAfterRoot
+		}
+	case eof:
+		if state.len() == 0 {
+			l.emit(jsonEOF)
+			return nil
+		} else {
+			return l.errorf("Unexpected EOF instead of value")
+		}
+	default:
+		return l.errorf("Unexpected character after json value token: %#U", cur)
+	}
+	return nil
+}
+
+func stateJsonKey(l lexer, state *intStack) stateFn {
+	if err := l.takeString(); err != nil {
+		return l.errorf(err.Error())
+	}
+	l.emit(jsonKey)
+
+	return stateJsonColon
+}
+
+func stateJsonColon(l lexer, state *intStack) stateFn {
+	cur := l.take()
+	if cur != ':' {
+		return l.errorf("Expected ':' after key string instead of %#U", cur)
+	}
+	l.emit(jsonColon)
+
+	return stateJsonValue
+}
+
+func stateJsonValue(l lexer, state *intStack) stateFn {
+	cur := l.peek()
+
+	switch cur {
+	case eof:
+		return l.errorf("Unexpected EOF instead of value")
+	case '"':
+		return stateJsonString
+	case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
+		return stateJsonNumber
+	case 't', 'f':
+		return stateJsonBool
+	case 'n':
+		return stateJsonNull
+	case '{':
+		return stateJsonObjectOpen
+	case '[':
+		return stateJsonArrayOpen
+	default:
+		return l.errorf("Unexpected character as start of value: %#U", cur)
+	}
+}
+
+func stateJsonString(l lexer, state *intStack) stateFn {
+	if err := l.takeString(); err != nil {
+		return l.errorf(err.Error())
+	}
+	l.emit(jsonString)
+	return stateJsonAfterValue
+}
+
+func stateJsonNumber(l lexer, state *intStack) stateFn {
+	if err := takeJSONNumeric(l); err != nil {
+		return l.errorf(err.Error())
+	}
+	l.emit(jsonNumber)
+	return stateJsonAfterValue
+}
+
+func stateJsonBool(l lexer, state *intStack) stateFn {
+	cur := l.peek()
+	var match []byte
+	switch cur {
+	case 't':
+		match = trueBytes
+	case 'f':
+		match = falseBytes
+	}
+
+	if !takeExactSequence(l, match) {
+		return l.errorf("Could not parse value as 'true' or 'false'")
+	}
+	l.emit(jsonBool)
+	return stateJsonAfterValue
+}
+
+func stateJsonNull(l lexer, state *intStack) stateFn {
+	if !takeExactSequence(l, nullBytes) {
+		return l.errorf("Could not parse value as 'null'")
+	}
+	l.emit(jsonNull)
+	return stateJsonAfterValue
+}
+
+func stateJsonAfterRoot(l lexer, state *intStack) stateFn {
+	cur := l.take()
+	if cur != eof {
+		return l.errorf("Expected EOF instead of %#U", cur)
+	}
+	l.emit(jsonEOF)
+	return nil
+}

http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/799e9ccb/cli/vendor/github.com/NodePrime/jsonpath/json_states_test.go
----------------------------------------------------------------------
diff --git a/cli/vendor/github.com/NodePrime/jsonpath/json_states_test.go b/cli/vendor/github.com/NodePrime/jsonpath/json_states_test.go
new file mode 100644
index 0000000..4ba22c1
--- /dev/null
+++ b/cli/vendor/github.com/NodePrime/jsonpath/json_states_test.go
@@ -0,0 +1,172 @@
+package jsonpath
+
+import (
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
+
+var jsonTests = []lexTest{
+	{"empty object", `{}`, []int{jsonBraceLeft, jsonBraceRight, jsonEOF}},
+	{"empty array", `[]`, []int{jsonBracketLeft, jsonBracketRight, jsonEOF}},
+	{"key string", `{"key" :"value"}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonString, jsonBraceRight, jsonEOF}},
+	{"multiple pairs", `{"key" :"value","key2" :"value"}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonString, jsonComma, jsonKey, jsonColon, jsonString, jsonBraceRight, jsonEOF}},
+	{"key number", `{"key" : 12.34e+56}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonNumber, jsonBraceRight, jsonEOF}},
+	{"key true", `{"key" :true}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBool, jsonBraceRight, jsonEOF}},
+	{"key false", `{"key" :false}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBool, jsonBraceRight, jsonEOF}},
+	{"key null", `{"key" :null}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonNull, jsonBraceRight, jsonEOF}},
+	{"key arrayOf number", `{"key" :[23]}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonNumber, jsonBracketRight, jsonBraceRight, jsonEOF}},
+	{"key array", `{"key" :[23,"45",67]}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonNumber, jsonComma, jsonString, jsonComma, jsonNumber, jsonBracketRight, jsonBraceRight, jsonEOF}},
+	{"key array", `{"key" :["45",{}]}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonString, jsonComma, jsonBraceLeft, jsonBraceRight, jsonBracketRight, jsonBraceRight, jsonEOF}},
+	{"key nestedObject", `{"key" :{"innerkey":"value"}}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBraceLeft, jsonKey, jsonColon, jsonString, jsonBraceRight, jsonBraceRight, jsonEOF}},
+	{"key nestedArray", `[1,["a","b"]]`, []int{jsonBracketLeft, jsonNumber, jsonComma, jsonBracketLeft, jsonString, jsonComma, jsonString, jsonBracketRight, jsonBracketRight, jsonEOF}},
+}
+
+func TestValidJson(t *testing.T) {
+	as := assert.New(t)
+
+	for _, test := range jsonTests {
+		lexer := NewSliceLexer([]byte(test.input), JSON)
+		types := itemsToTypes(readerToArray(lexer))
+
+		as.EqualValues(types, test.tokenTypes, "Testing of %q: \nactual\n\t%+v\nexpected\n\t%v", test.name, typesDescription(types, jsonTokenNames), typesDescription(test.tokenTypes, jsonTokenNames))
+	}
+}
+
+var errorJsonTests = []lexTest{
+	{"Missing end brace", `{`, []int{jsonBraceLeft, jsonError}},
+	{"Missing start brace", `}`, []int{jsonError}},
+	{"Missing key start quote", `{key":true}`, []int{jsonBraceLeft, jsonError}},
+	{"Missing key end quote", `{"key:true}`, []int{jsonBraceLeft, jsonError}},
+	{"Missing colon", `{"key"true}`, []int{jsonBraceLeft, jsonKey, jsonError}},
+	{"Missing value", `{"key":}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonError}},
+	{"Missing string start quote", `{"key":test"}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonError}},
+	{"Missing embedded array bracket", `{"key":[}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonError}},
+	{"Missing values in array", `{"key":[,]`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonError}},
+	{"Missing value after comma", `{"key":[343,]}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonNumber, jsonComma, jsonError}},
+	{"Missing comma in array", `{"key":[234 424]}`, []int{jsonBraceLeft, jsonKey, jsonColon, jsonBracketLeft, jsonNumber, jsonError}},
+}
+
+func TestMalformedJson(t *testing.T) {
+	as := assert.New(t)
+
+	for _, test := range errorJsonTests {
+		lexer := NewSliceLexer([]byte(test.input), JSON)
+		types := itemsToTypes(readerToArray(lexer))
+
+		as.EqualValues(types, test.tokenTypes, "Testing of %q: \nactual\n\t%+v\nexpected\n\t%v", test.name, typesDescription(types, jsonTokenNames), typesDescription(test.tokenTypes, jsonTokenNames))
+	}
+}
+
+func itemsToTypes(items []Item) []int {
+	types := make([]int, len(items))
+	for i, item := range items {
+		types[i] = item.typ
+	}
+	return types
+}
+
+// func TestEarlyTerminationForJSON(t *testing.T) {
+// 	as := assert.New(t)
+// 	wg := sync.WaitGroup{}
+
+// 	lexer := NewSliceLexer(`{"key":"value", "key2":{"ikey":3}, "key3":[1,2,3,4]}`)
+// 	wg.Add(1)
+// 	go func() {
+// 		lexer.Run(JSON)
+// 		wg.Done()
+// 	}()
+
+// 	// Pop a few items
+// 	<-lexer.items
+// 	<-lexer.items
+// 	// Kill command
+// 	close(lexer.kill)
+
+// 	wg.Wait()
+// 	remainingItems := readerToArray(lexer.items)
+// 	// TODO: Occasionally fails - rethink this
+// 	_ = as
+// 	_ = remainingItems
+// 	// as.True(len(remainingItems) <= bufferSize, "Count of remaining items should be less than buffer size: %d", len(remainingItems))
+// }
+
+var examples = []string{
+	`{"items":[
+	  {
+	    "name": "example document for wicked fast parsing of huge json docs",
+	    "integer": 123,
+	    "totally sweet scientific notation": -123.123e-2,
+	    "unicode? you betcha!": "ú™£¢∞§\u2665",
+	    "zero character": "0",
+	    "null is boring": null
+	  },
+	  {
+	    "name": "another object",
+	    "cooler than first object?": true,
+	    "nested object": {
+	      "nested object?": true,
+	      "is nested array the same combination i have on my luggage?": true,
+	      "nested array": [1,2,3,4,5]
+	    },
+	    "false": false
+	  }
+]}`,
+	`{
+    "$schema": "http://json-schema.org/draft-04/schema#",
+    "title": "Product set",
+    "type": "array",
+    "items": {
+        "title": "Product",
+        "type": "object",
+        "properties": {
+            "id": {
+                "description": "The unique identifier for a product",
+                "type": "number"
+            },
+            "name": {
+                "type": "string"
+            },
+            "price": {
+                "type": "number",
+                "minimum": 0,
+                "exclusiveMinimum": true
+            },
+            "tags": {
+                "type": "array",
+                "items": {
+                    "type": "string"
+                },
+                "minItems": 1,
+                "uniqueItems": true
+            },
+            "dimensions": {
+                "type": "object",
+                "properties": {
+                    "length": {"type": "number"},
+                    "width": {"type": "number"},
+                    "height": {"type": "number"}
+                },
+                "required": ["length", "width", "height"]
+            },
+            "warehouseLocation": {
+                "description": "Coordinates of the warehouse with the product",
+                "$ref": "http://json-schema.org/geo"
+            }
+        },
+        "required": ["id", "name", "price"]
+    }
+   }`,
+}
+
+func TestMixedCaseJson(t *testing.T) {
+	as := assert.New(t)
+	for _, json := range examples {
+		lexer := NewSliceLexer([]byte(json), JSON)
+		items := readerToArray(lexer)
+
+		for _, i := range items {
+			as.False(i.typ == jsonError, "Found error while parsing: %q", i.val)
+		}
+	}
+}