Add generated file
This PR adds generated files under pkg/client and vendor folder.
This commit is contained in:
3
vendor/github.com/container-storage-interface/spec/.gitignore
generated
vendored
Normal file
3
vendor/github.com/container-storage-interface/spec/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.tmp
|
||||
.DS_Store
|
||||
.build
|
38
vendor/github.com/container-storage-interface/spec/.travis.yml
generated
vendored
Normal file
38
vendor/github.com/container-storage-interface/spec/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Setting "sudo" to false forces Travis-CI to use its
|
||||
# container-based build infrastructure, which has shorter
|
||||
# queue times.
|
||||
sudo: false
|
||||
|
||||
# Use the newer Travis-CI build templates based on the
|
||||
# Debian Linux distribution "Trusty" release.
|
||||
dist: trusty
|
||||
|
||||
# Selecting C as the language keeps the container to a
|
||||
# minimum footprint.
|
||||
language: c
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
||||
# The test stage validates that the protobuf file was updated
|
||||
# correctly prior to being committed.
|
||||
- stage: test
|
||||
script: make
|
||||
|
||||
# The lang stages validate the specification using
|
||||
# language-specific bindings.
|
||||
|
||||
# Lang stage: Cxx
|
||||
- stage: lang
|
||||
script: make -C lib/cxx
|
||||
|
||||
# Lang stage: Go
|
||||
- stage: lang
|
||||
language: go
|
||||
go: 1.9.5
|
||||
go_import_path: github.com/container-storage-interface/spec
|
||||
install:
|
||||
- make -C lib/go protoc
|
||||
- make -C lib/go protoc-gen-go
|
||||
script:
|
||||
- make -C lib/go
|
52
vendor/github.com/container-storage-interface/spec/CONTRIBUTING.md
generated
vendored
Normal file
52
vendor/github.com/container-storage-interface/spec/CONTRIBUTING.md
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# How to Contribute
|
||||
|
||||
CSI is under [Apache 2.0](LICENSE) and accepts contributions via GitHub pull requests.
|
||||
This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted.
|
||||
|
||||
## Markdown style
|
||||
|
||||
To keep consistency throughout the Markdown files in the CSI spec, all files should be formatted one sentence per line.
|
||||
This fixes two things: it makes diffing easier with git and it resolves fights about line wrapping length.
|
||||
For example, this paragraph will span three lines in the Markdown source.
|
||||
|
||||
## Code style
|
||||
|
||||
This also applies to the code snippets in the markdown files.
|
||||
|
||||
* Please wrap the code at 72 characters.
|
||||
|
||||
## Comments
|
||||
|
||||
This also applies to the code snippets in the markdown files.
|
||||
|
||||
* End each sentence within a comment with a punctuation mark (please note that we generally prefer periods); this applies to incomplete sentences as well.
|
||||
* For trailing comments, leave one space between the end of the code and the beginning of the comment.
|
||||
|
||||
## Git commit
|
||||
|
||||
The "system of record" for the specification is the `spec.md` file and all hand-edits of the specification should happen there.
|
||||
**DO NOT** manually edit the generated protobufs or generated language bindings.
|
||||
Once changes to `spec.md` are complete, please run `make` to update generated files.
|
||||
|
||||
**IMPORTANT:** Prior to committing code please run `make` to ensure that your specification changes have landed in all generated files.
|
||||
|
||||
### Commit Style
|
||||
|
||||
Each commit should represent a single logical (atomic) change: this makes your changes easier to review.
|
||||
|
||||
* Try to avoid unrelated cleanups (e.g., typo fixes or style nits) in the same commit that makes functional changes.
|
||||
While typo fixes are great, including them in the same commit as functional changes makes the commit history harder to read.
|
||||
* Developers often make incremental commits to save their progress when working on a change, and then “rewrite history” (e.g., using `git rebase -i`) to create a clean set of commits once the change is ready to be reviewed.
|
||||
|
||||
Simple house-keeping for clean git history.
|
||||
Read more on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/) or the Discussion section of [`git-commit(1)`](http://git-scm.com/docs/git-commit).
|
||||
|
||||
* Separate the subject from body with a blank line.
|
||||
* Limit the subject line to 50 characters.
|
||||
* Capitalize the subject line.
|
||||
* Do not end the subject line with a period.
|
||||
* Use the imperative mood in the subject line.
|
||||
* Wrap the body at 72 characters.
|
||||
* Use the body to explain what and why vs. how.
|
||||
* If there was important/useful/essential conversation or information, copy or include a reference.
|
||||
* When possible, one keyword to scope the change in the subject (i.e. "README: ...", "tool: ...").
|
201
vendor/github.com/container-storage-interface/spec/LICENSE
generated
vendored
Normal file
201
vendor/github.com/container-storage-interface/spec/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
51
vendor/github.com/container-storage-interface/spec/Makefile
generated
vendored
Normal file
51
vendor/github.com/container-storage-interface/spec/Makefile
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
all: build
|
||||
|
||||
CSI_SPEC := spec.md
|
||||
CSI_PROTO := csi.proto
|
||||
|
||||
# This is the target for building the temporary CSI protobuf file.
|
||||
#
|
||||
# The temporary file is not versioned, and thus will always be
|
||||
# built on Travis-CI.
|
||||
$(CSI_PROTO).tmp: $(CSI_SPEC) Makefile
|
||||
echo "// Code generated by make; DO NOT EDIT." > "$@"
|
||||
cat $< | sed -n -e '/```protobuf$$/,/^```$$/ p' | sed '/^```/d' >> "$@"
|
||||
|
||||
# This is the target for building the CSI protobuf file.
|
||||
#
|
||||
# This target depends on its temp file, which is not versioned.
|
||||
# Therefore when built on Travis-CI the temp file will always
|
||||
# be built and trigger this target. On Travis-CI the temp file
|
||||
# is compared with the real file, and if they differ the build
|
||||
# will fail.
|
||||
#
|
||||
# Locally the temp file is simply copied over the real file.
|
||||
$(CSI_PROTO): $(CSI_PROTO).tmp
|
||||
ifeq (true,$(TRAVIS))
|
||||
diff "$@" "$?"
|
||||
else
|
||||
diff "$@" "$?" > /dev/null 2>&1 || cp -f "$?" "$@"
|
||||
endif
|
||||
|
||||
build: check
|
||||
|
||||
# If this is not running on Travis-CI then for sake of convenience
|
||||
# go ahead and update the language bindings as well.
|
||||
ifneq (true,$(TRAVIS))
|
||||
build:
|
||||
$(MAKE) -C lib/go
|
||||
$(MAKE) -C lib/cxx
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(MAKE) -C lib/go $@
|
||||
|
||||
clobber: clean
|
||||
$(MAKE) -C lib/go $@
|
||||
rm -f $(CSI_PROTO) $(CSI_PROTO).tmp
|
||||
|
||||
# check generated files for violation of standards
|
||||
check: $(CSI_PROTO)
|
||||
awk '{ if (length > 72) print NR, $$0 }' $? | diff - /dev/null
|
||||
|
||||
.PHONY: clean clobber check
|
10
vendor/github.com/container-storage-interface/spec/OWNERS
generated
vendored
Normal file
10
vendor/github.com/container-storage-interface/spec/OWNERS
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
approvers:
|
||||
- saad-ali # Representing Kubernetes
|
||||
- thockin # Representing Kubernetes
|
||||
- jieyu # Representing Mesos
|
||||
- jdef # Representing Mesos
|
||||
- cpuguy83 # Representing Docker
|
||||
- mycure # Representing Docker
|
||||
- julian-hj # Representing Cloud Foundry
|
||||
- paulcwarren # Representing Cloud Foundry
|
||||
reviewers:
|
13
vendor/github.com/container-storage-interface/spec/README.md
generated
vendored
Normal file
13
vendor/github.com/container-storage-interface/spec/README.md
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Container Storage Interface (CSI) Specification [](https://travis-ci.org/container-storage-interface/spec)
|
||||
|
||||

|
||||
|
||||
This project contains the CSI [specification](spec.md) and [protobuf](csi.proto) files.
|
||||
|
||||
## CSI Adoption
|
||||
|
||||
### Container Orchestrators (CO)
|
||||
|
||||
* [Cloud Foundry](https://github.com/cloudfoundry/csi-local-volume-release)
|
||||
* [Kubernetes](https://kubernetes-csi.github.io/docs/)
|
||||
* [Mesos](http://mesos.apache.org/documentation/latest/csi/)
|
1
vendor/github.com/container-storage-interface/spec/VERSION
generated
vendored
Normal file
1
vendor/github.com/container-storage-interface/spec/VERSION
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
0.3.0
|
1093
vendor/github.com/container-storage-interface/spec/csi.proto
generated
vendored
Normal file
1093
vendor/github.com/container-storage-interface/spec/csi.proto
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
vendor/github.com/container-storage-interface/spec/lib/README.md
generated
vendored
Normal file
2
vendor/github.com/container-storage-interface/spec/lib/README.md
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# CSI Validation Libraries
|
||||
This directory contains language bindings generated from the CSI [protobuf file](../csi.proto) used to validate the model and workflows of the CSI specification.
|
9
vendor/github.com/container-storage-interface/spec/lib/cxx/Makefile
generated
vendored
Normal file
9
vendor/github.com/container-storage-interface/spec/lib/cxx/Makefile
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
all: build
|
||||
|
||||
build:
|
||||
@echo "cxx bindings & validation"
|
||||
|
||||
clean:
|
||||
@echo "clean cxx"
|
||||
|
||||
.PHONY: clean
|
4
vendor/github.com/container-storage-interface/spec/lib/go/.gitignore
generated
vendored
Normal file
4
vendor/github.com/container-storage-interface/spec/lib/go/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/protoc
|
||||
/protoc-gen-go
|
||||
/csi.a
|
||||
/.protoc
|
129
vendor/github.com/container-storage-interface/spec/lib/go/Makefile
generated
vendored
Normal file
129
vendor/github.com/container-storage-interface/spec/lib/go/Makefile
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
all: build
|
||||
|
||||
########################################################################
|
||||
## GOLANG ##
|
||||
########################################################################
|
||||
|
||||
# If GOPATH isn't defined then set its default location.
|
||||
ifeq (,$(strip $(GOPATH)))
|
||||
GOPATH := $(HOME)/go
|
||||
else
|
||||
# If GOPATH is already set then update GOPATH to be its own
|
||||
# first element.
|
||||
GOPATH := $(word 1,$(subst :, ,$(GOPATH)))
|
||||
endif
|
||||
export GOPATH
|
||||
|
||||
|
||||
########################################################################
|
||||
## PROTOC ##
|
||||
########################################################################
|
||||
|
||||
# Only set PROTOC_VER if it has an empty value.
|
||||
ifeq (,$(strip $(PROTOC_VER)))
|
||||
PROTOC_VER := 3.5.1
|
||||
endif
|
||||
|
||||
PROTOC_OS := $(shell uname -s)
|
||||
ifeq (Darwin,$(PROTOC_OS))
|
||||
PROTOC_OS := osx
|
||||
endif
|
||||
|
||||
PROTOC_ARCH := $(shell uname -m)
|
||||
ifeq (i386,$(PROTOC_ARCH))
|
||||
PROTOC_ARCH := x86_32
|
||||
endif
|
||||
|
||||
PROTOC := ./protoc
|
||||
PROTOC_ZIP := protoc-$(PROTOC_VER)-$(PROTOC_OS)-$(PROTOC_ARCH).zip
|
||||
PROTOC_URL := https://github.com/google/protobuf/releases/download/v$(PROTOC_VER)/$(PROTOC_ZIP)
|
||||
PROTOC_TMP_DIR := .protoc
|
||||
PROTOC_TMP_BIN := $(PROTOC_TMP_DIR)/bin/protoc
|
||||
|
||||
$(PROTOC):
|
||||
-mkdir -p "$(PROTOC_TMP_DIR)" && \
|
||||
curl -L $(PROTOC_URL) -o "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" && \
|
||||
unzip "$(PROTOC_TMP_DIR)/$(PROTOC_ZIP)" -d "$(PROTOC_TMP_DIR)" && \
|
||||
chmod 0755 "$(PROTOC_TMP_BIN)" && \
|
||||
cp -f "$(PROTOC_TMP_BIN)" "$@"
|
||||
stat "$@" > /dev/null 2>&1
|
||||
|
||||
|
||||
########################################################################
|
||||
## PROTOC-GEN-GO ##
|
||||
########################################################################
|
||||
|
||||
# This is the recipe for getting and installing the go plug-in
|
||||
# for protoc
|
||||
PROTOC_GEN_GO_PKG := github.com/golang/protobuf/protoc-gen-go
|
||||
PROTOC_GEN_GO := protoc-gen-go
|
||||
$(PROTOC_GEN_GO): PROTOBUF_PKG := $(dir $(PROTOC_GEN_GO_PKG))
|
||||
$(PROTOC_GEN_GO): PROTOBUF_VERSION := v1.1.0
|
||||
$(PROTOC_GEN_GO):
|
||||
mkdir -p $(dir $(GOPATH)/src/$(PROTOBUF_PKG))
|
||||
test -d $(GOPATH)/src/$(PROTOBUF_PKG)/.git || git clone https://$(PROTOBUF_PKG) $(GOPATH)/src/$(PROTOBUF_PKG)
|
||||
(cd $(GOPATH)/src/$(PROTOBUF_PKG) && \
|
||||
(test "$$(git describe --tags | head -1)" = "$(PROTOBUF_VERSION)" || \
|
||||
(git fetch && git checkout tags/$(PROTOBUF_VERSION))))
|
||||
(cd $(GOPATH)/src/$(PROTOBUF_PKG) && go get -v -d ./...) && \
|
||||
go build -o "$@" $(PROTOC_GEN_GO_PKG)
|
||||
|
||||
|
||||
########################################################################
|
||||
## PATH ##
|
||||
########################################################################
|
||||
|
||||
# Update PATH with the current directory. This enables the protoc
|
||||
# binary to discover the protoc-gen-go binary, built inside this
|
||||
# directory.
|
||||
export PATH := $(shell pwd):$(PATH)
|
||||
|
||||
|
||||
########################################################################
|
||||
## BUILD ##
|
||||
########################################################################
|
||||
CSI_PROTO := ../../csi.proto
|
||||
CSI_PKG := $(shell cat $(CSI_PROTO) | sed -n -e 's/^package.\([^;]*\);$$/\1/p'|tr '.' '/')
|
||||
CSI_GO := $(CSI_PKG)/csi.pb.go
|
||||
CSI_A := csi.a
|
||||
CSI_GO_TMP := $(CSI_PKG)/.build/csi.pb.go
|
||||
|
||||
# This recipe generates the go language bindings to a temp area.
|
||||
$(CSI_GO_TMP): GO_OUT := plugins=grpc
|
||||
$(CSI_GO_TMP): GO_OUT := $(GO_OUT),Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers
|
||||
$(CSI_GO_TMP): INCLUDE = -I$(PROTOC_TMP_DIR)/include
|
||||
$(CSI_GO_TMP): $(CSI_PROTO) | $(PROTOC) $(PROTOC_GEN_GO)
|
||||
@mkdir -p "$(@D)"
|
||||
$(PROTOC) -I "$(<D)" $(INCLUDE) --go_out=$(GO_OUT):"$(@D)" "$<"
|
||||
|
||||
# The temp language bindings are compared to the ones that are
|
||||
# versioned. If they are different then it means the language
|
||||
# bindings were not updated prior to being committed.
|
||||
$(CSI_GO): $(CSI_GO_TMP)
|
||||
ifeq (true,$(TRAVIS))
|
||||
diff "$@" "$?"
|
||||
else
|
||||
@mkdir -p "$(@D)"
|
||||
diff "$@" "$?" > /dev/null 2>&1 || cp -f "$?" "$@"
|
||||
endif
|
||||
|
||||
# This recipe builds the Go archive from the sources in three steps:
|
||||
#
|
||||
# 1. Go get any missing dependencies.
|
||||
# 2. Cache the packages.
|
||||
# 3. Build the archive file.
|
||||
$(CSI_A): $(CSI_GO)
|
||||
go get -v -d ./...
|
||||
go install ./$(CSI_PKG)
|
||||
go build -o "$@" ./$(CSI_PKG)
|
||||
|
||||
build: $(CSI_A)
|
||||
|
||||
clean:
|
||||
go clean -i ./...
|
||||
rm -f "$(CSI_A)"
|
||||
|
||||
clobber: clean
|
||||
rm -fr "$(PROTOC)" "$(PROTOC_GEN_GO)" "$(CSI_PKG)"
|
||||
|
||||
.PHONY: clean clobber
|
21
vendor/github.com/container-storage-interface/spec/lib/go/README.md
generated
vendored
Normal file
21
vendor/github.com/container-storage-interface/spec/lib/go/README.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# CSI Go Validation
|
||||
|
||||
This package is used to validate the CSI specification with Go language bindings.
|
||||
|
||||
## Build Reference
|
||||
|
||||
To validate the Go language bindings against the current specification use the following command:
|
||||
|
||||
```bash
|
||||
$ make
|
||||
```
|
||||
|
||||
The above command will download the `protoc` and `protoc-gen-go` binaries if they are not present and then proceed to build the CSI Go language bindings.
|
||||
|
||||
### Environment Variables
|
||||
|
||||
The following table lists the environment variables that can be used to influence the behavior of the Makefile:
|
||||
|
||||
| Name | Default Value | Description |
|
||||
|------|---------------|-------------|
|
||||
| `PROTOC_VER` | `3.3.0` | The version of the protoc binary. |
|
5
vendor/github.com/container-storage-interface/spec/lib/go/csi.go
generated
vendored
Normal file
5
vendor/github.com/container-storage-interface/spec/lib/go/csi.go
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
// Package csi is the Container Storage Interface (CSI) specification
|
||||
// repository. This package contains no functional code, and this file
|
||||
// exists only to make it possible to import this repository with a Go
|
||||
// dependency manager such as Dep (https://github.com/golang/dep).
|
||||
package csi
|
4991
vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go
generated
vendored
Normal file
4991
vendor/github.com/container-storage-interface/spec/lib/go/csi/v0/csi.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
vendor/github.com/container-storage-interface/spec/logo.png
generated
vendored
Executable file
BIN
vendor/github.com/container-storage-interface/spec/logo.png
generated
vendored
Executable file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
2166
vendor/github.com/container-storage-interface/spec/spec.md
generated
vendored
Normal file
2166
vendor/github.com/container-storage-interface/spec/spec.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user