so there was weird whitespacing that got messed up the last time this was run, this fixes that and cleans up vendor helpers as well :)
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
| ... | ... |
@@ -105,11 +105,8 @@ clean() {
|
| 105 | 105 |
export GOOS="${platform%/*}";
|
| 106 | 106 |
export GOARCH="${platform##*/}";
|
| 107 | 107 |
for buildTags in "${buildTagCombos[@]}"; do
|
| 108 |
- pkgs=( $(go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}" | grep -E "^${PROJECT}" | grep -vE "^${PROJECT}/vendor" | sort -u) )
|
|
| 109 |
- pkgs+=( ${packages[@]} )
|
|
| 110 |
- testImports=( $(go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${pkgs[@]}" | sort -u) )
|
|
| 111 |
- printf '%s\n' "${testImports[@]}"
|
|
| 112 |
- go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]} ${testImports[@]}"
|
|
| 108 |
+ go list -e -tags "$buildTags" -f '{{join .Deps "\n"}}' "${packages[@]}"
|
|
| 109 |
+ go list -e -tags "$buildTags" -f '{{join .TestImports "\n"}}' "${packages[@]}"
|
|
| 113 | 110 |
done |
| 114 | 111 |
done | grep -vE "^${PROJECT}" | sort -u
|
| 115 | 112 |
) ) |
| ... | ... |
@@ -120,8 +117,6 @@ clean() {
|
| 120 | 120 |
findArgs=( |
| 121 | 121 |
# This directory contains only .c and .h files which are necessary |
| 122 | 122 |
-path vendor/src/github.com/mattn/go-sqlite3/code |
| 123 |
- # This directory is needed for compiling the unit tests |
|
| 124 |
- -o -path vendor/src/github.com/stretchr/objx |
|
| 125 | 123 |
) |
| 126 | 124 |
for import in "${imports[@]}"; do
|
| 127 | 125 |
[ "${#findArgs[@]}" -eq 0 ] || findArgs+=( -or )
|
| 128 | 126 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,111 @@ |
| 0 |
+#/bin/sh |
|
| 1 |
+ |
|
| 2 |
+set -e |
|
| 3 |
+ |
|
| 4 |
+usage() |
|
| 5 |
+{
|
|
| 6 |
+cat << EOF |
|
| 7 |
+NAME: |
|
| 8 |
+ machines - Create Test Environments for Docker Networking |
|
| 9 |
+ |
|
| 10 |
+VERSION: |
|
| 11 |
+ 0.1 |
|
| 12 |
+ |
|
| 13 |
+USAGE: |
|
| 14 |
+ $0 <command> [command_options] [arguments...] |
|
| 15 |
+ |
|
| 16 |
+COMMANDS: |
|
| 17 |
+ help |
|
| 18 |
+ Help and usage |
|
| 19 |
+ |
|
| 20 |
+ up <kv-store> <scale> |
|
| 21 |
+ Create environment with given KV store |
|
| 22 |
+ zookeeper | etcd | consul (default) |
|
| 23 |
+ Create N nodes, default = 2 |
|
| 24 |
+ |
|
| 25 |
+ destroy |
|
| 26 |
+ Destroy Environment |
|
| 27 |
+ |
|
| 28 |
+EOF |
|
| 29 |
+} |
|
| 30 |
+ |
|
| 31 |
+step() {
|
|
| 32 |
+ printf "\033[0;36m-----> $@\033[0m\n" |
|
| 33 |
+} |
|
| 34 |
+ |
|
| 35 |
+up() |
|
| 36 |
+{
|
|
| 37 |
+ step "Creating KV Store Machine" |
|
| 38 |
+ docker-machine create \ |
|
| 39 |
+ -d virtualbox \ |
|
| 40 |
+ mh-kv |
|
| 41 |
+ |
|
| 42 |
+ step "KV Store is $1" |
|
| 43 |
+ step "Starting KV Container" |
|
| 44 |
+ case "$1" in |
|
| 45 |
+ etcd) |
|
| 46 |
+ cluster_store="cluster-store=etcd://$(docker-machine ip mh-kv):2379" |
|
| 47 |
+ docker $(docker-machine config mh-kv) run -d \ |
|
| 48 |
+ -p "2379:2379" \ |
|
| 49 |
+ -h "etcd" \ |
|
| 50 |
+ --name "etcd" \ |
|
| 51 |
+ quay.io/coreos/etcd:v2.2.1 \ |
|
| 52 |
+ --listen-client-urls="http://0.0.0.0:2379" \ |
|
| 53 |
+ --advertise-client-urls="http://$(docker-machine ip mh-kv):2379" |
|
| 54 |
+ ;; |
|
| 55 |
+ zookeeper) |
|
| 56 |
+ cluster_store="cluster-store=zk://$(docker-machine ip mh-kv):2181" |
|
| 57 |
+ docker $(docker-machine config mh-kv) run -d \ |
|
| 58 |
+ -p "2181:2181" \ |
|
| 59 |
+ -h "zookeeper" \ |
|
| 60 |
+ --name "zookeeper" \ |
|
| 61 |
+ tianon/zookeeper |
|
| 62 |
+ ;; |
|
| 63 |
+ *) |
|
| 64 |
+ cluster_store="cluster-store=consul://$(docker-machine ip mh-kv):8500" |
|
| 65 |
+ docker $(docker-machine config mh-kv) run -d \ |
|
| 66 |
+ -p "8500:8500" \ |
|
| 67 |
+ -h "consul" \ |
|
| 68 |
+ --name "consul" \ |
|
| 69 |
+ progrium/consul -server -bootstrap-expect 1 |
|
| 70 |
+ ;; |
|
| 71 |
+ esac |
|
| 72 |
+ |
|
| 73 |
+ machines=$2 |
|
| 74 |
+ if [ -z machines ]; then |
|
| 75 |
+ machines=2 |
|
| 76 |
+ fi |
|
| 77 |
+ step "Creating $machines Machines" |
|
| 78 |
+ |
|
| 79 |
+ for i in $(seq $machines); do |
|
| 80 |
+ step "Creating machine $i" |
|
| 81 |
+ docker-machine create \ |
|
| 82 |
+ -d virtualbox \ |
|
| 83 |
+ --engine-opt="cluster-advertise=eth1:2376" \ |
|
| 84 |
+ --engine-opt="$cluster_store" \ |
|
| 85 |
+ mh-$i |
|
| 86 |
+ done |
|
| 87 |
+} |
|
| 88 |
+ |
|
| 89 |
+destroy() |
|
| 90 |
+{
|
|
| 91 |
+ for x in $(docker-machine ls | grep mh- | awk '{ print $1 }'); do
|
|
| 92 |
+ docker-machine rm $x |
|
| 93 |
+ done |
|
| 94 |
+} |
|
| 95 |
+ |
|
| 96 |
+case "$1" in |
|
| 97 |
+ up) |
|
| 98 |
+ shift |
|
| 99 |
+ up $@ |
|
| 100 |
+ ;; |
|
| 101 |
+ destroy) |
|
| 102 |
+ destroy $@ |
|
| 103 |
+ ;; |
|
| 104 |
+ help) |
|
| 105 |
+ usage |
|
| 106 |
+ ;; |
|
| 107 |
+ *) |
|
| 108 |
+ usage |
|
| 109 |
+ ;; |
|
| 110 |
+esac |
| ... | ... |
@@ -25,7 +25,7 @@ const ( |
| 25 | 25 |
|
| 26 | 26 |
// Generated with: awk '/#define CK[AFKMR]/{ print $2 "=" $3 }' pkcs11t.h
|
| 27 | 27 |
|
| 28 |
-// All the flag (CKF_), attribute (CKA_), error code (CKR_), key type (CKK_) and |
|
| 28 |
+// All the flag (CKF_), attribute (CKA_), error code (CKR_), key type (CKK_) and |
|
| 29 | 29 |
// mechanism (CKM_) constants as defined in PKCS#11. |
| 30 | 30 |
const ( |
| 31 | 31 |
CKF_TOKEN_PRESENT = 0x00000001 |
| ... | ... |
@@ -7,10 +7,10 @@ |
| 7 | 7 |
|
| 8 | 8 |
* License is also granted to make and use derivative works provided that |
| 9 | 9 |
* such works are identified as "derived from the RSA Security Inc. PKCS #11 |
| 10 |
- * Cryptographic Token Interface (Cryptoki)" in all material mentioning or |
|
| 10 |
+ * Cryptographic Token Interface (Cryptoki)" in all material mentioning or |
|
| 11 | 11 |
* referencing the derived work. |
| 12 | 12 |
|
| 13 |
- * RSA Security Inc. makes no representations concerning either the |
|
| 13 |
+ * RSA Security Inc. makes no representations concerning either the |
|
| 14 | 14 |
* merchantability of this software or the suitability of this software for |
| 15 | 15 |
* any particular purpose. It is provided "as is" without express or implied |
| 16 | 16 |
* warranty of any kind. |
| ... | ... |
@@ -275,7 +275,7 @@ extern "C" {
|
| 275 | 275 |
|
| 276 | 276 |
#define CK_PKCS11_FUNCTION_INFO(name) \ |
| 277 | 277 |
__PASTE(CK_,name) name; |
| 278 |
- |
|
| 278 |
+ |
|
| 279 | 279 |
struct CK_FUNCTION_LIST {
|
| 280 | 280 |
|
| 281 | 281 |
CK_VERSION version; /* Cryptoki version */ |
| ... | ... |
@@ -7,10 +7,10 @@ |
| 7 | 7 |
|
| 8 | 8 |
* License is also granted to make and use derivative works provided that |
| 9 | 9 |
* such works are identified as "derived from the RSA Security Inc. PKCS #11 |
| 10 |
- * Cryptographic Token Interface (Cryptoki)" in all material mentioning or |
|
| 10 |
+ * Cryptographic Token Interface (Cryptoki)" in all material mentioning or |
|
| 11 | 11 |
* referencing the derived work. |
| 12 | 12 |
|
| 13 |
- * RSA Security Inc. makes no representations concerning either the |
|
| 13 |
+ * RSA Security Inc. makes no representations concerning either the |
|
| 14 | 14 |
* merchantability of this software or the suitability of this software for |
| 15 | 15 |
* any particular purpose. It is provided "as is" without express or implied |
| 16 | 16 |
* warranty of any kind. |
| ... | ... |
@@ -562,7 +562,7 @@ CK_PKCS11_FUNCTION_INFO(C_Sign) |
| 562 | 562 |
|
| 563 | 563 |
|
| 564 | 564 |
/* C_SignUpdate continues a multiple-part signature operation, |
| 565 |
- * where the signature is (will be) an appendix to the data, |
|
| 565 |
+ * where the signature is (will be) an appendix to the data, |
|
| 566 | 566 |
* and plaintext cannot be recovered from the signature. */ |
| 567 | 567 |
CK_PKCS11_FUNCTION_INFO(C_SignUpdate) |
| 568 | 568 |
#ifdef CK_NEED_ARG_LIST |
| ... | ... |
@@ -574,7 +574,7 @@ CK_PKCS11_FUNCTION_INFO(C_SignUpdate) |
| 574 | 574 |
#endif |
| 575 | 575 |
|
| 576 | 576 |
|
| 577 |
-/* C_SignFinal finishes a multiple-part signature operation, |
|
| 577 |
+/* C_SignFinal finishes a multiple-part signature operation, |
|
| 578 | 578 |
* returning the signature. */ |
| 579 | 579 |
CK_PKCS11_FUNCTION_INFO(C_SignFinal) |
| 580 | 580 |
#ifdef CK_NEED_ARG_LIST |
| ... | ... |
@@ -623,12 +623,12 @@ CK_PKCS11_FUNCTION_INFO(C_VerifyInit) |
| 623 | 623 |
( |
| 624 | 624 |
CK_SESSION_HANDLE hSession, /* the session's handle */ |
| 625 | 625 |
CK_MECHANISM_PTR pMechanism, /* the verification mechanism */ |
| 626 |
- CK_OBJECT_HANDLE hKey /* verification key */ |
|
| 626 |
+ CK_OBJECT_HANDLE hKey /* verification key */ |
|
| 627 | 627 |
); |
| 628 | 628 |
#endif |
| 629 | 629 |
|
| 630 | 630 |
|
| 631 |
-/* C_Verify verifies a signature in a single-part operation, |
|
| 631 |
+/* C_Verify verifies a signature in a single-part operation, |
|
| 632 | 632 |
* where the signature is an appendix to the data, and plaintext |
| 633 | 633 |
* cannot be recovered from the signature. */ |
| 634 | 634 |
CK_PKCS11_FUNCTION_INFO(C_Verify) |
| ... | ... |
@@ -644,7 +644,7 @@ CK_PKCS11_FUNCTION_INFO(C_Verify) |
| 644 | 644 |
|
| 645 | 645 |
|
| 646 | 646 |
/* C_VerifyUpdate continues a multiple-part verification |
| 647 |
- * operation, where the signature is an appendix to the data, |
|
| 647 |
+ * operation, where the signature is an appendix to the data, |
|
| 648 | 648 |
* and plaintext cannot be recovered from the signature. */ |
| 649 | 649 |
CK_PKCS11_FUNCTION_INFO(C_VerifyUpdate) |
| 650 | 650 |
#ifdef CK_NEED_ARG_LIST |
| ... | ... |
@@ -770,7 +770,7 @@ CK_PKCS11_FUNCTION_INFO(C_GenerateKey) |
| 770 | 770 |
#endif |
| 771 | 771 |
|
| 772 | 772 |
|
| 773 |
-/* C_GenerateKeyPair generates a public-key/private-key pair, |
|
| 773 |
+/* C_GenerateKeyPair generates a public-key/private-key pair, |
|
| 774 | 774 |
* creating new key objects. */ |
| 775 | 775 |
CK_PKCS11_FUNCTION_INFO(C_GenerateKeyPair) |
| 776 | 776 |
#ifdef CK_NEED_ARG_LIST |