1
0
mirror of https://github.com/ceph/ceph-csi.git synced 2025-06-14 18:53:35 +00:00

vendor updates

This commit is contained in:
Serguei Bezverkhi
2018-03-06 17:33:18 -05:00
parent 4b3ebc171b
commit e9033989a0
5854 changed files with 248382 additions and 119809 deletions
vendor
github.com
golang.org
x
net
sys
text
google.golang.org
genproto
grpc
k8s.io
apimachinery
.github
CONTRIBUTING.md
Godeps
README.mdcode-of-conduct.md
hack
pkg
api
apimachinery
BUILD
announced
registered
apis
conversion
fields
labels
runtime
test
util
watch
third_party
forked
golang
json
reflect
kubernetes
.gitattributes.gitignoreCHANGELOG-1.10.mdCHANGELOG-1.9.mdCHANGELOG.mdCONTRIBUTING.md
Godeps
OWNERS_ALIASESREADME.mdVagrantfile
api
build
cluster
BUILD
addons
BUILD
addon-manager
calico-policy-controller
cluster-loadbalancing
cluster-monitoring
dashboard
device-plugins
nvidia-gpu
dns-horizontal-autoscaler
dns
etcd-empty-dir-cleanup
fluentd-elasticsearch
fluentd-gcp
ip-masq-agent
istio
metadata-agent
metadata-proxy
metrics-server
node-problem-detector
python-image
registry
aws
centos
clientbin.shcommon.sh
gce
get-kube-local.shget-kube.sh
images
juju
layers
kubeapi-load-balancer
kubernetes-e2e
kubernetes-master
kubernetes-worker
kube-push.shkube-up.sh
kubemark
lib
libvirt-coreos
log-dump
openstack-heat
options.md
photon-controller
restore-from-backup.sh
saltbase
skeleton
vagrant
validate-cluster.sh
vsphere
windows
cmd
BUILD
clicheck
cloud-controller-manager
controller-manager
gendocs
genkubedocs
genman
genswaggertypedocs
genutils
genyaml
gke-certificates-controller
hyperkube
importverifier
kube-apiserver
kube-controller-manager
kube-proxy
kube-scheduler
kubeadm
BUILDOWNERS
app
BUILD
apis
cmd
constants
discovery
features
images
phases
preflight
util
test
kubectl
kubelet
kubemark
linkcheck
code-of-conduct.md
docs
examples
BUILD
cluster-dns
elasticsearch
examples_test.go
explorer
guestbook-go
guestbook
https-nginx
kubectl-container
newrelic-infrastructure
podsecuritypolicy
scheduler-policy-config-with-extender.jsonscheduler-policy-config.json
sharing-clusters
spark
storage
volumes
hack
.golint_failures.spelling_failuresBUILDOWNERS
boilerplate
cherry_pick_pull.sh
cmd
teststale
gen-swagger-doc
generate-bindata.shginkgo-e2e.shgodep-restore.shgodep-save.shgrab-profiles.sh
jenkins
lib
local-up-cluster.sh
make-rules
print-workspace-status.shtest-update-storage-objects.sh
testdata
update-all.shupdate-bazel.shupdate-cloudprovider-gce.shupdate-codegen.shupdate-generated-device-plugin-dockerized.shupdate-generated-kms-dockerized.shupdate-generated-kms.shupdate-generated-protobuf-dockerized.shupdate-generated-runtime-dockerized.shupdate-generated-swagger-docs.shupdate-godep-licenses.shupdate-swagger-spec.shverify-bazel.shverify-boilerplate.shverify-cloudprovider-gce.sh
verify-flags
verify-generated-device-plugin.shverify-generated-kms.shverify-generated-protobuf.shverify-generated-runtime.shverify-godep-licenses.shverify-godeps.shverify-gofmt.shverify-openapi-spec.shverify-spelling.shverify-staging-godeps.shverify-swagger-spec.shverify-typecheck.sh
pkg
BUILD
api
apimachinery
apis
OWNERS
abac
admission
admissionregistration
apps
authentication
authorization
autoscaling
batch
certificates
componentconfig
core
events
extensions
imagepolicy
networking
policy
rbac
scheduling
settings
storage
auth
authorizer
handlers
nodeidentifier
capabilities
client
chaosclient
clientset_generated
internalclientset
clientset.godoc.go
fake
scheme
typed
admissionregistration
apps
authentication
authorization
autoscaling
batch
certificates
core
events
extensions
networking
policy
rbac
scheduling
settings
storage
conditions
informers
listers
admissionregistration
apps
authentication
authorization
autoscaling
batch
certificates
core
extensions
imagepolicy
networking
policy
rbac
scheduling
settings
storage
tests
unversioned
cloudprovider
cloud.goplugins.go
providers
aws
azure
cloudstack
fake
gce
openstack
ovirt
photon
vsphere
controller
BUILD
bootstrap
certificates
cloud
clusterroleaggregation
controller_ref_manager.gocontroller_utils.go
cronjob
daemon
deployment
disruption
endpoint
garbagecollector
history
job
namespace
deletion
nodeipam
nodelifecycle
podautoscaler
podgc
replicaset
replication
resourcequota
route
service
serviceaccount
statefulset
ttl
util
volume
credentialprovider
features
fieldpath
generated
hyperkube
kubeapiserver
kubectl
.import-restrictionsBUILDapply.go
apply
parse
strategy
apps
autoscale.goautoscale_test.go
categories
cmd
BUILDannotate.goannotate_test.goapply.goapply_edit_last_applied.goapply_set_last_applied.goapply_test.goapply_view_last_applied.goattach.goattach_test.go
auth
autoscale.gocertificates.goclusterinfo.goclusterinfo_dump_test.gocmd.gocmd_test.gocompletion.go
config
convert.goconvert_test.gocp.gocreate.gocreate_clusterrole.gocreate_clusterrole_test.gocreate_clusterrolebinding.gocreate_clusterrolebinding_test.gocreate_configmap.gocreate_configmap_test.gocreate_deployment.gocreate_deployment_test.gocreate_job.gocreate_job_test.gocreate_namespace.gocreate_namespace_test.gocreate_pdb.gocreate_pdb_test.gocreate_priorityclass.gocreate_priorityclass_test.gocreate_quota.gocreate_quota_test.gocreate_role.gocreate_role_test.gocreate_rolebinding.gocreate_rolebinding_test.gocreate_secret.gocreate_secret_test.gocreate_service.gocreate_service_test.gocreate_serviceaccount.gocreate_serviceaccount_test.gocreate_test.godelete.godelete_test.godescribe.godescribe_test.godiff.godrain.godrain_test.goedit.goedit_test.goexec.goexec_test.goexplain.goexpose.goexpose_test.gohelp.golabel.golabel_test.gologs.gologs_test.gopatch.gopatch_test.goplugin.goplugin_test.goportforward.goportforward_test.goproxy.goreplace.goreplace_test.go
resource
rollingupdate.gorollingupdate_test.go
rollout
run.gorun_test.goscale.go
set
taint.gotaint_test.go
testdata
edit
BUILD
testcase-not-update-annotation
testcase-schemaless-list
testcase-unknown-field-known-group-kind
testcase-unknown-version-known-group-kind
testcase-update-annotation
testing
top.gotop_node.gotop_node_test.gotop_pod.gotop_pod_test.gotop_test.go
util
conditions.goconfigmap.goconfigmap_test.godelete.godelete_test.goenv_file.go
explain
history.go
metricsutil
namespace_test.go
plugins
proxy
resource
rollback.gorollback_test.gorolling_updater.gorolling_updater_test.gorollout_status.goscale.goscale_test.go
scheme
testing
util
validation
versioned_client.go
kubelet
BUILD
apis
cadvisor
certificate
checkpoint
client
cm
config
configmap
container
custommetrics
dockershim
envvars
events
eviction
gpu
nvidia
images
kubelet.gokubelet_getters.gokubelet_network.gokubelet_node_status.gokubelet_node_status_test.gokubelet_pods.gokubelet_pods_test.gokubelet_test.gokubelet_volumes_test.go
kubeletconfig
kuberuntime
lifecycle
logs
metrics
mountpod
network
pleg
pod
pod_workers_test.go
preemption
prober
qos
remote
rkt
rktshim
runtime.go
secret
server
stats
status
sysctl
types
util
BUILD
cache
format
queue
sliceutils
store
volume_host.go
volumemanager
winstats
kubemark
master
printers
probe
proxy
quota
registry
BUILD
admissionregistration
apps
authentication
authorization
rest
subjectaccessreview
util
autoscaling
horizontalpodautoscaler
storage
rest
batch
certificates
core
events
extensions
controller
ingress
BUILD
storage
podsecuritypolicy
storage
rest
networking
networkpolicy
storage
rest
policy
rbac
scheduling
priorityclass
BUILD
storage
rest
settings
podpreset
storage
rest
storage
rest
storageclass
volumeattachment
routes
scheduler
BUILDOWNERS
algorithm
algorithmprovider
api
core
factory
metrics
scheduler.goscheduler_test.go
schedulercache
testing
testutil.go
util
volumebinder
security
securitycontext
serviceaccount
ssh
util
version
volume
BUILD
aws_ebs
azure_dd
azure_file
cephfs
cinder
configmap
csi
downwardapi
empty_dir
fc
flexvolume
flocker
gce_pd
git_repo
glusterfs
host_path
iscsi
local
metrics_du.gometrics_statfs.go
nfs
photon_pd
plugins.goplugins_test.go
portworx
projected
quobyte
rbd
scaleio
secret
storageos
testing
util.go
util
util_test.go
validation
vsphere_volume
watch
versioned
plugin
BUILD
pkg
admission
admit
alwayspullimages
antiaffinity
defaulttolerationseconds
deny
eventratelimit
exec
extendedresourcetoleration
gc
imagepolicy
initialresources
limitranger
namespace
noderestriction
persistentvolume
persistentvolumeclaim
pvcprotection
podnodeselector
podpreset
podtolerationrestriction
priority
resourcequota
security
securitycontext
serviceaccount
storage
storageclass
storageobjectinuseprotection
auth
scheduler
staging
BUILD
src
k8s.io
api
.github
CONTRIBUTING.md
Godeps
OWNERS
admission
admissionregistration
apps
authentication
authorization
autoscaling
batch
certificates
code-of-conduct.md
core
events
extensions
imagepolicy
networking
policy
rbac
scheduling
settings
storage
apiextensions-apiserver
.github
BUILDCONTRIBUTING.md
Godeps
artifacts
example
code-of-conduct.md
examples
client-go
pkg
apis
client
clientset
versioned
hack
pkg
apis
apiserver
client
cmd
server
controller
features
registry
test
apimachinery
.github
CONTRIBUTING.md
Godeps
README.mdcode-of-conduct.md
pkg
api
apimachinery
BUILD
announced
registered
apis
conversion
fields
labels
runtime
test
util
watch
third_party
forked
golang
json
reflect
apiserver
.github
Godeps
OWNERSREADME.mdcode-of-conduct.md
pkg
admission
apis
audit
authentication
group
request
anonymous
bearertoken
headerrequest
union
websocket
x509
serviceaccount
token
cache
tokenfile
union
authorization
authorizer
authorizerfactory
union
endpoints
registry
server
storage
util
plugin
client-go
.github
CONTRIBUTING.md
Godeps
code-of-conduct.md
discovery
dynamic
examples
create-update-delete-deployment
in-cluster-client-configuration
out-of-cluster-client-configuration
workqueue
informers
admissionregistration
apps
autoscaling
batch
certificates
core
events
extensions
factory.gogeneric.go
internalinterfaces
networking
policy
rbac
scheduling
settings
storage
kubernetes
clientset.godoc.go
fake
scheme
typed
admissionregistration
apps
authentication
authorization
autoscaling
batch
certificates
core
events
extensions
networking
policy
rbac
scheduling
settings
storage
listers
admissionregistration
apps
authentication
authorization
autoscaling
batch
certificates
core
events
extensions
imagepolicy
networking
policy
rbac
scheduling
settings
storage
pkg
version
plugin
pkg
auth
authenticator
token
oidc
client
auth
rest
scale
testing
tools
transport
util
code-generator
.github
CONTRIBUTING.md
Godeps
_examples
apiserver
crd
cmd
code-of-conduct.mdgenerate-groups.shgenerate-internal-groups.sh
hack
pkg
kube-aggregator
.github
BUILDCONTRIBUTING.md
Godeps
code-of-conduct.md
hack
main.go
pkg
apis
apiserver
client
cmd
controllers
registry
metrics
sample-apiserver
sample-controller
test
BUILDOWNERS
conformance
e2e
BUILD
apimachinery
apps
auth
autoscaling
chaosmonkey
common
e2e.goe2e_test.goexamples.go
framework
generated
instrumentation
lifecycle
manifest
network
node
scalability
scheduling
storage
testing-manifests
ui
upgrades
e2e_node
fixtures
images
MakefileOWNERS
clusterapi-tester
entrypoint-tester
fakegitserver
goproxy
hostexec
image-util.sh
ipc-utils
iperf
liveness
logs-generator
mounttest
n-way-http
net
netexec
nettest
no-snat-test-proxy
no-snat-test
nonewprivs
pets
peer-finder
redis-installer
zookeeper-installer
port-forward-tester
porter
resource-consumer
serve-hostname
test-webserver
volumes-tester
webhook
integration
kubemark
list
soak
cauldron
serve_hostnames
test_owners.csv
typecheck
utils
third_party
translations
OWNERSREADME.md
kubectl
de_DE
LC_MESSAGES
default
LC_MESSAGES
en_US
LC_MESSAGES
it_IT
LC_MESSAGES
ja_JP
LC_MESSAGES
template.pot
zh_CN
LC_MESSAGES
utils

@ -193,7 +193,8 @@ func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeU
// "Generated output always contains 3, 6, or 9 fractional digits,
// depending on required precision."
s, ns := s.Field(0).Int(), s.Field(1).Int()
x := fmt.Sprintf("%d.%09d", s, ns)
d := time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond
x := fmt.Sprintf("%.9f", d.Seconds())
x = strings.TrimSuffix(x, "000")
x = strings.TrimSuffix(x, "000")
out.write(`"`)

@ -407,7 +407,6 @@ var marshalingTests = []struct {
{"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON},
{"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON},
{"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3.000s"}`},
{"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 100000000, Nanos: 1}}, `{"dur":"100000000.000000001s"}`},
{"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{
Fields: map[string]*stpb.Value{
"one": {Kind: &stpb.Value_StringValue{"loneliest number"}},

151
vendor/github.com/golang/protobuf/proto/discard.go generated vendored Normal file

@ -0,0 +1,151 @@
// Go support for Protocol Buffers - Google's data interchange format
//
// Copyright 2017 The Go Authors. All rights reserved.
// https://github.com/golang/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package proto
import (
"fmt"
"reflect"
"strings"
)
// DiscardUnknown recursively discards all unknown fields from this message
// and all embedded messages.
//
// When unmarshaling a message with unrecognized fields, the tags and values
// of such fields are preserved in the Message. This allows a later call to
// marshal to be able to produce a message that continues to have those
// unrecognized fields. To avoid this, DiscardUnknown is used to
// explicitly clear the unknown fields after unmarshaling.
//
// For proto2 messages, the unknown fields of message extensions are only
// discarded from messages that have been accessed via GetExtension.
func DiscardUnknown(m Message) {
discardLegacy(m)
}
func discardLegacy(m Message) {
v := reflect.ValueOf(m)
if v.Kind() != reflect.Ptr || v.IsNil() {
return
}
v = v.Elem()
if v.Kind() != reflect.Struct {
return
}
t := v.Type()
for i := 0; i < v.NumField(); i++ {
f := t.Field(i)
if strings.HasPrefix(f.Name, "XXX_") {
continue
}
vf := v.Field(i)
tf := f.Type
// Unwrap tf to get its most basic type.
var isPointer, isSlice bool
if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
isSlice = true
tf = tf.Elem()
}
if tf.Kind() == reflect.Ptr {
isPointer = true
tf = tf.Elem()
}
if isPointer && isSlice && tf.Kind() != reflect.Struct {
panic(fmt.Sprintf("%T.%s cannot be a slice of pointers to primitive types", m, f.Name))
}
switch tf.Kind() {
case reflect.Struct:
switch {
case !isPointer:
panic(fmt.Sprintf("%T.%s cannot be a direct struct value", m, f.Name))
case isSlice: // E.g., []*pb.T
for j := 0; j < vf.Len(); j++ {
discardLegacy(vf.Index(j).Interface().(Message))
}
default: // E.g., *pb.T
discardLegacy(vf.Interface().(Message))
}
case reflect.Map:
switch {
case isPointer || isSlice:
panic(fmt.Sprintf("%T.%s cannot be a pointer to a map or a slice of map values", m, f.Name))
default: // E.g., map[K]V
tv := vf.Type().Elem()
if tv.Kind() == reflect.Ptr && tv.Implements(protoMessageType) { // Proto struct (e.g., *T)
for _, key := range vf.MapKeys() {
val := vf.MapIndex(key)
discardLegacy(val.Interface().(Message))
}
}
}
case reflect.Interface:
// Must be oneof field.
switch {
case isPointer || isSlice:
panic(fmt.Sprintf("%T.%s cannot be a pointer to a interface or a slice of interface values", m, f.Name))
default: // E.g., test_proto.isCommunique_Union interface
if !vf.IsNil() && f.Tag.Get("protobuf_oneof") != "" {
vf = vf.Elem() // E.g., *test_proto.Communique_Msg
if !vf.IsNil() {
vf = vf.Elem() // E.g., test_proto.Communique_Msg
vf = vf.Field(0) // E.g., Proto struct (e.g., *T) or primitive value
if vf.Kind() == reflect.Ptr {
discardLegacy(vf.Interface().(Message))
}
}
}
}
}
}
if vf := v.FieldByName("XXX_unrecognized"); vf.IsValid() {
if vf.Type() != reflect.TypeOf([]byte{}) {
panic("expected XXX_unrecognized to be of type []byte")
}
vf.Set(reflect.ValueOf([]byte(nil)))
}
// For proto2 messages, only discard unknown fields in message extensions
// that have been accessed via GetExtension.
if em, ok := extendable(m); ok {
// Ignore lock since discardLegacy is not concurrency safe.
emm, _ := em.extensionsRead()
for _, mx := range emm {
if m, ok := mx.value.(Message); ok {
discardLegacy(m)
}
}
}
}