diff --git a/Gopkg.lock b/Gopkg.lock index aca9f31c11..5c650a7fdc 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -3,104 +3,79 @@ [[projects]] branch = "default" - digest = "1:24df057f15e7a09e75c1241cbe6f6590fd3eac9804f1110b02efade3214f042d" name = "bitbucket.org/ww/goautoneg" packages = ["."] - pruneopts = "UT" revision = "75cd24fc2f2c2a2088577d12123ddee5f54e0675" [[projects]] - digest = "1:aa65b4877ac225076b4362885e9122fdf6a8728f735749c24f1aeabcad9bdaba" name = "cloud.google.com/go" packages = [ "compute/metadata", - "internal", + "internal" ] - pruneopts = "UT" revision = "3b1ae45394a234c385be014e9a488f2bb6eef821" [[projects]] - digest = "1:6da51e5ec493ad2b44cb04129e2d0a068c8fb9bd6cb5739d199573558696bb94" name = "github.com/Azure/go-ansiterm" packages = [ ".", - "winterm", + "winterm" ] - pruneopts = "UT" revision = "d6e3b3328b783f23731bc4d058875b0371ff8109" [[projects]] - digest = "1:7e11a0a4c2d7792a108629e27c83ff4397b950dede4ccce23f99639bfa84846b" name = "github.com/Azure/go-autorest" packages = [ "autorest", "autorest/adal", "autorest/azure", "autorest/date", - "version", + "version" ] - pruneopts = "UT" revision = "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" [[projects]] - digest = "1:51d5156c2de01719fdf90b21197b95bc7e8c9d43ca0d5c3f5c875b8b530077c8" name = "github.com/MakeNowJust/heredoc" packages = ["."] - pruneopts = "UT" revision = "bb23615498cded5e105af4ce27de75b089cbe851" [[projects]] - digest = "1:6e6779c1e7984081358a4aee6f944233c8cbabfb28ca9dc0e20af595d476ebf4" name = "github.com/Masterminds/semver" packages = ["."] - pruneopts = "UT" revision = "517734cc7d6470c0d07130e40fd40bdeb9bcd3fd" [[projects]] - digest = "1:b125ffa3363b22cec9699f14b6c926299240acd77267c08a4199e8a0cd5fed3d" name = "github.com/Masterminds/sprig" packages = ["."] - pruneopts = "UT" revision = "e039e20e500c2c025d9145be375e27cf42a94174" [[projects]] - digest = "1:20695cc3d37c69d8a95420452e9d1afd29cc67cf54934a5d5738404e0831aad8" name = "github.com/Microsoft/go-winio" packages = ["."] - pruneopts = "UT" revision = "78439966b38d69bf38227fbf57ac8a6fee70f69a" [[projects]] - digest = "1:002edd3097e9eb1ad56da7e29ed3bfdc8f85765d667a84246b38a7226c829ad2" name = "github.com/NYTimes/gziphandler" packages = ["."] - pruneopts = "UT" revision = "56545f4a5d46df9a6648819d1664c3a03a13ffdb" [[projects]] - digest = "1:792c6f8317411834d22db5be14276cd87d589cb0f8dcc51c042f0dddf67d60b1" name = "github.com/PuerkitoBio/purell" packages = ["."] - pruneopts = "UT" revision = "8a290539e2e8629dbc4e6bad948158f790ec31f4" [[projects]] - digest = "1:61e5d7b1fabd5b6734b2595912944dbd9f6e0eaa4adef25e5cbf98754fc91df1" name = "github.com/PuerkitoBio/urlesc" packages = ["."] - pruneopts = "UT" revision = "5bd2802263f21d8788851d5305584c82a5c75d7e" [[projects]] - digest = "1:8f5416c7f59da8600725ae1ff00a99af1da8b04c211ae6f3c8f8bcab0164f650" name = "github.com/aokoli/goutils" packages = ["."] - pruneopts = "UT" revision = "3391d3790d23d03408670993e957e8f408993c34" version = "v1.0.1" [[projects]] - digest = "1:bec386c02055f020566931a5dae08ec5582f1488f50b18d767d5c0edba71c434" name = "github.com/aws/aws-sdk-go" packages = [ "aws", @@ -155,14 +130,12 @@ "service/route53", "service/route53/route53iface", "service/s3", - "service/sts", + "service/sts" ] - pruneopts = "UT" revision = "3991042237b45cf58c9d5f34295942d5533c28c6" version = "v1.16.11" [[projects]] - digest = "1:8b019763cb155094c7919d577530604dc070a05315f24b3a2b102a8f9570725f" name = "github.com/bazelbuild/bazel-gazelle" packages = [ "cmd/gazelle", @@ -179,61 +152,49 @@ "internal/rule", "internal/version", "internal/walk", - "internal/wspace", + "internal/wspace" ] - pruneopts = "UT" revision = "6a1b93cc9b1c7e55e7d05a6d324bcf9d87ea3ab1" version = "0.14.0" [[projects]] - digest = "1:331f668c3b6315145093a3b104c1da6be2835a3b1e7c873ad5fba82667330d44" name = "github.com/bazelbuild/buildtools" packages = [ "build", - "tables", + "tables" ] - pruneopts = "UT" revision = "a05406a1a855c6d8ebfc368555ace7638d83c0d9" version = "0.6.0" [[projects]] - digest = "1:2daf57e573d4174757646e9d416d25e4dbe4533237961a90b986091a2de12830" name = "github.com/beorn7/perks" packages = ["quantile"] - pruneopts = "UT" revision = "3ac7bf7a47d159a033b107610db8a1b6575507a4" [[projects]] - digest = "1:6f77df4efbb5c5395eb72fe762e8ccb094da7647dd25e5f35d229705086517d2" name = "github.com/blang/semver" packages = ["."] - pruneopts = "UT" revision = "b38d23b8782a487059e8fc8773e9a5b228a77cb6" [[projects]] - digest = "1:95e08278c876d185ba67533f045e9e63b3c9d02cbd60beb0f4dbaa2344a13ac2" name = "github.com/chai2010/gettext-go" packages = [ "gettext", "gettext/mo", "gettext/plural", - "gettext/po", + "gettext/po" ] - pruneopts = "UT" revision = "bf70f2a70fb1b1f36d90d671a72795984eab0fcb" [[projects]] - digest = "1:0ce0e197e582c7ca76ddeada87305cfec365c8e3ef9a28246b49c2ce4ed18438" name = "github.com/client9/misspell" packages = [ ".", - "cmd/misspell", + "cmd/misspell" ] - pruneopts = "UT" revision = "9ce5d979ffdaca6385988d7ad1079a33ec942d20" [[projects]] - digest = "1:85750424c77d04d64073381237b5ea65a468e95b70e2cadc74616b73947d6162" name = "github.com/coreos/etcd" packages = [ "auth/authpb", @@ -247,49 +208,37 @@ "pkg/tlsutil", "pkg/transport", "pkg/types", - "version", + "version" ] - pruneopts = "UT" revision = "420a452267a7ce45b3fcbed04d54030d69964fc1" [[projects]] - digest = "1:c298fe11665f7157328f2978bc60f761ffcc706b94bf077e661a59fe29b291a0" name = "github.com/coreos/go-semver" packages = ["semver"] - pruneopts = "UT" revision = "568e959cd89871e61434c1143528d9162da89ef2" [[projects]] - digest = "1:fa91847d50d3f656fc2d2d608b9749b97d77528e8988ad8001f957640545e91e" name = "github.com/coreos/go-systemd" packages = ["daemon"] - pruneopts = "UT" revision = "48702e0da86bd25e76cfef347e2adeb434a0d0a6" [[projects]] - digest = "1:cc832d4c674b57b5c67f683f75fba043dd3eec6fcd9b936f00cc8ddf439f2131" name = "github.com/cpuguy83/go-md2man" packages = ["md2man"] - pruneopts = "UT" revision = "71acacd42f85e5e82f70a55327789582a5200a90" [[projects]] - digest = "1:6b21090f60571b20b3ddc2c8e48547dffcf409498ed6002c2cada023725ed377" name = "github.com/davecgh/go-spew" packages = ["spew"] - pruneopts = "UT" revision = "782f4967f2dc4564575ca782fe2d04090b5faca8" [[projects]] - digest = "1:e0caf4c33e84cb58f7362b0bcc2f3049d9b3cc471cbab5f2273c8306f7b6bc92" name = "github.com/daviddengcn/go-colortext" packages = ["."] - pruneopts = "UT" revision = "511bcaf42ccd42c38aba7427b6673277bf19e2a1" [[projects]] branch = "master" - digest = "1:c208e46a2c410d62b3e5c97f1f1db797d8d0862307b7800c4783dac5be1c83fa" name = "github.com/denverdino/aliyungo" packages = [ "common", @@ -298,40 +247,32 @@ "oss", "ram", "slb", - "util", + "util" ] - pruneopts = "UT" revision = "2581e433b270014481c9ec66a91368661533febb" [[projects]] - digest = "1:dd39e40faa3d7a12ce2b930efbe954a45e8f91a87e2adf5d8654ccb6137c4ab2" name = "github.com/dgrijalva/jwt-go" packages = ["."] - pruneopts = "UT" revision = "01aeca54ebda6e0fbfafd0a524d234159c05ec20" [[projects]] - digest = "1:f1b23499a437050e7ceb7e3f5111ec8ead263161395c585c19721d59b1244da9" name = "github.com/digitalocean/godo" packages = [ ".", - "context", + "context" ] - pruneopts = "UT" revision = "34840385860db94c88d044571153b6a200ca40b2" [[projects]] - digest = "1:4189ee6a3844f555124d9d2656fe7af02fca961c2a9bad9074789df13a0c62e0" name = "github.com/docker/distribution" packages = [ "digestset", - "reference", + "reference" ] - pruneopts = "UT" revision = "edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c" [[projects]] - digest = "1:4a3f40f6dae89af404e86137ecd1d4696fce09cb1472d8943f18001fa160bf9b" name = "github.com/docker/docker" packages = [ "api/types", @@ -346,13 +287,11 @@ "api/types/swarm/runtime", "api/types/versions", "pkg/term", - "pkg/term/windows", + "pkg/term/windows" ] - pruneopts = "UT" revision = "a9fbbdc8dd8794b20af358382ab780559bca589d" [[projects]] - digest = "1:344f93aea3423a982f0b82467672e699439fd2c3106a37738780bccf043e0646" name = "github.com/docker/engine-api" packages = [ "client", @@ -367,193 +306,145 @@ "types/registry", "types/strslice", "types/time", - "types/versions", + "types/versions" ] - pruneopts = "UT" revision = "dea108d3aa0c67d7162a3fd8aa65f38a430019fd" [[projects]] - digest = "1:b6b5c3e8da0fb8073cd2886ba249a40f4402b4391ca6eba905a142cceea97a12" name = "github.com/docker/go-connections" packages = [ "nat", "sockets", - "tlsconfig", + "tlsconfig" ] - pruneopts = "UT" revision = "3ede32e2033de7505e6500d6c868c2b9ed9f169d" [[projects]] - digest = "1:57d39983d01980c1317c2c5c6dd4b5b0c4a804ad2df800f2f6cbcd6a6d05f6ca" name = "github.com/docker/go-units" packages = ["."] - pruneopts = "UT" revision = "9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1" [[projects]] - digest = "1:58be7025fd84632dfbb8a398f931b5bdbbecc0390e4385df4ae56775487a0f87" name = "github.com/docker/spdystream" packages = [ ".", - "spdy", + "spdy" ] - pruneopts = "UT" revision = "449fdfce4d962303d702fec724ef0ad181c92528" [[projects]] - digest = "1:1f1d454098ba2f8e7b87f0166e30533a72dddb80bace79643a78933fa4889613" name = "github.com/elazarl/go-bindata-assetfs" packages = ["."] - pruneopts = "UT" revision = "3dcc96556217539f50599357fb481ac0dc7439b9" [[projects]] - digest = "1:87c056b4f0548034ade51456237b47f723b901f373d7c11295f80da5d3b91950" name = "github.com/emicklei/go-restful" packages = [ ".", - "log", + "log" ] - pruneopts = "UT" revision = "ff4f55a206334ef123e4f79bbf348980da81ca46" [[projects]] - digest = "1:ddab18e89cf46e40707b89dbe3835b4a591b0ea298e1035eefa84002aa9a4b4e" name = "github.com/emicklei/go-restful-swagger12" packages = ["."] - pruneopts = "UT" revision = "dcef7f55730566d41eae5db10e7d6981829720f6" [[projects]] - digest = "1:e28563a1502222b269250bf79e7807da0574ab03f238f880275fdc1a02baeb39" name = "github.com/evanphx/json-patch" packages = ["."] - pruneopts = "UT" revision = "36442dbdb585210f8d5a1b45e67aa323c197d5c4" [[projects]] branch = "master" - digest = "1:5e0da1aba1a7b125f46e6ddca43e98b40cf6eaea3322b016c331cf6afe53c30a" name = "github.com/exponent-io/jsonpath" packages = ["."] - pruneopts = "UT" revision = "d6023ce2651d8eafb5c75bb0c7167536102ec9f5" [[projects]] - digest = "1:e263726ba0d84e5ab1d9b96de99ab84249c83aea493c3dabfc652480189c8c7c" name = "github.com/fatih/camelcase" packages = ["."] - pruneopts = "UT" revision = "f6a740d52f961c60348ebb109adde9f4635d7540" [[projects]] - digest = "1:28c2511ad34394d299bca82becccc5dff425819faca8b9fbef0bcd5a88c87d29" name = "github.com/fsnotify/fsnotify" packages = ["."] - pruneopts = "UT" revision = "f12c6236fe7b5cf6bcf30e5935d08cb079d78334" [[projects]] branch = "master" - digest = "1:965ce99497c18d9e739e35ca3c2985f876bfbbcc36557fa8ce0927068edaea15" name = "github.com/fullsailor/pkcs7" packages = ["."] - pruneopts = "UT" revision = "ae226422660e5ca10db350d33f81c6608f3fbcdd" [[projects]] - digest = "1:c45cef8e0074ea2f8176a051df38553ba997a3616f1ec2d35222b1cf9864881e" name = "github.com/ghodss/yaml" packages = ["."] - pruneopts = "UT" revision = "73d445a93680fa1a78ae23a5839bad48f32ba1ee" [[projects]] - digest = "1:8e4f6662aa166f5690677c0c3540b241b01b327871bf53cd8f995efb655d4b14" name = "github.com/go-ini/ini" packages = ["."] - pruneopts = "UT" revision = "300e940a926eb277d3901b20bdfcc54928ad3642" version = "v1.25.4" [[projects]] - digest = "1:614effa484825888e550adaf95f078bf53b79278af6bc86d2d3325a601df416e" name = "github.com/go-openapi/analysis" packages = ["."] - pruneopts = "UT" revision = "b44dc874b601d9e4e2f6e19140e794ba24bead3b" [[projects]] - digest = "1:172569c4bdc486213be0121e6039df4c272e9ff29397d9fd3716c31e4b37e15d" name = "github.com/go-openapi/jsonpointer" packages = ["."] - pruneopts = "UT" revision = "46af16f9f7b149af66e5d1bd010e3574dc06de98" [[projects]] - digest = "1:f30ccde775458301b306f4576e11de88d3ed0d91e68a5f3591c4ed8afbca76fa" name = "github.com/go-openapi/jsonreference" packages = ["."] - pruneopts = "UT" revision = "13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272" [[projects]] - digest = "1:a24fd9035281e9deb746beae6b04b637b0c04e75d55c3fad9d5ec233e83abc71" name = "github.com/go-openapi/loads" packages = ["."] - pruneopts = "UT" revision = "a80dea3052f00e5f032e860dd7355cd0cc67e24d" [[projects]] - digest = "1:ed3642d1497a543323f731039927aef565de45bafaffc97d138d7dc5bc14b5b5" name = "github.com/go-openapi/spec" packages = ["."] - pruneopts = "UT" revision = "1de3e0542de65ad8d75452a595886fdd0befb363" [[projects]] - digest = "1:3a42f9cbdeb4db3a14e0c3bb35852b7426b69f73386d52b606baf5d0fecfb4d7" name = "github.com/go-openapi/swag" packages = ["."] - pruneopts = "UT" revision = "f3f9494671f93fcff853e3c6e9e948b3eb71e590" [[projects]] - digest = "1:c64649af439e22d36d55b53927d1ca7db7c15428a29b1e155752e5cb7902fbbb" name = "github.com/gobuffalo/envy" packages = ["."] - pruneopts = "UT" revision = "ef60bfc50c8f92d1ee64674d8ce7a48f1f67625e" version = "v1.6.2" [[projects]] - digest = "1:aa01c876fb4c8fb74b7e37bcf23e5359b32335b24b7cad1d5a343d856c916305" name = "github.com/gogo/protobuf" packages = [ "gogoproto", "proto", "protoc-gen-gogo/descriptor", - "sortkeys", + "sortkeys" ] - pruneopts = "UT" revision = "c0656edd0d9eab7c66d1eb0c568f9039345796f7" [[projects]] - digest = "1:2edd2416f89b4e841df0e4a78802ce14d2bc7ad79eba1a45986e39f0f8cb7d87" name = "github.com/golang/glog" packages = ["."] - pruneopts = "UT" revision = "44145f04b68cf362d9c4df2182967c2275eaefed" [[projects]] - digest = "1:7672c206322f45b33fac1ae2cb899263533ce0adcc6481d207725560208ec84e" name = "github.com/golang/groupcache" packages = ["lru"] - pruneopts = "UT" revision = "02826c3e79038b59d737d3b1c0a1d937f71a4433" [[projects]] - digest = "1:14834e04828af9e53954f1be45ea7f190c4c26d746009c2ab07c5828595539e9" name = "github.com/golang/protobuf" packages = [ "proto", @@ -561,67 +452,66 @@ "ptypes", "ptypes/any", "ptypes/duration", - "ptypes/timestamp", + "ptypes/timestamp" ] - pruneopts = "UT" revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" [[projects]] - digest = "1:62dfb39fe3bddeabb02cc001075ed9f951b044da2cd5b0f970ca798b1553bac3" name = "github.com/google/btree" packages = ["."] - pruneopts = "UT" revision = "7d79101e329e5a3adf994758c578dab82b90c017" [[projects]] - digest = "1:ef985937fb7a6a7cf752a0e84bd7b61dd337da7c15635f65bc05508209a50289" name = "github.com/google/cadvisor" packages = ["pages/static"] - pruneopts = "UT" revision = "fc17731afdcf184832482e324913c8f1a91b54ee" [[projects]] branch = "master" - digest = "1:a63cff6b5d8b95638bfe300385d93b2a6d9d687734b863da8e09dc834510a690" name = "github.com/google/go-querystring" packages = ["query"] - pruneopts = "UT" revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" [[projects]] - digest = "1:41bfd4219241b7f7d6e6fdb13fc712576f1337e68e6b895136283b76928fdd66" name = "github.com/google/gofuzz" packages = ["."] - pruneopts = "UT" revision = "44d81051d367757e1c7c6a5a86423ece9afcf63c" [[projects]] - digest = "1:75eb87381d25cc75212f52358df9c3a2719584eaa9685cd510ce28699122f39d" name = "github.com/googleapis/gnostic" packages = [ "OpenAPIv2", "compiler", - "extensions", + "extensions" ] - pruneopts = "UT" revision = "0c5108395e2debce0d731cf0287ddf7242066aba" [[projects]] - digest = "1:dc8be055c0a43584d2b728953be6d507c8a48a9b6e055c2dffdb8d8414eb703b" name = "github.com/gophercloud/gophercloud" packages = [ ".", "openstack", "openstack/blockstorage/v2/volumes", + "openstack/compute/v2/extensions/availabilityzones", + "openstack/compute/v2/extensions/floatingips", "openstack/compute/v2/extensions/keypairs", "openstack/compute/v2/extensions/schedulerhints", "openstack/compute/v2/extensions/servergroups", + "openstack/compute/v2/extensions/volumeattach", "openstack/compute/v2/flavors", "openstack/compute/v2/images", "openstack/compute/v2/servers", + "openstack/dns/v2/recordsets", + "openstack/dns/v2/zones", "openstack/identity/v2/tenants", "openstack/identity/v2/tokens", "openstack/identity/v3/tokens", + "openstack/loadbalancer/v2/listeners", + "openstack/loadbalancer/v2/loadbalancers", + "openstack/loadbalancer/v2/monitors", + "openstack/loadbalancer/v2/pools", + "openstack/networking/v2/extensions/external", + "openstack/networking/v2/extensions/layer3/floatingips", "openstack/networking/v2/extensions/layer3/routers", "openstack/networking/v2/extensions/security/groups", "openstack/networking/v2/extensions/security/rules", @@ -632,56 +522,44 @@ "openstack/objectstorage/v1/containers", "openstack/objectstorage/v1/objects", "openstack/utils", - "pagination", + "pagination" ] - pruneopts = "UT" revision = "f29afc2cceca860199ee88cd355a4d0a37b3fad2" [[projects]] - digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1" name = "github.com/gorilla/context" packages = ["."] - pruneopts = "UT" revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42" version = "v1.1.1" [[projects]] - digest = "1:e73f5b0152105f18bc131fba127d9949305c8693f8a762588a82a48f61756f5f" name = "github.com/gorilla/mux" packages = ["."] - pruneopts = "UT" revision = "e3702bed27f0d39777b0b37b664b6280e8ef8fbf" version = "v1.6.2" [[projects]] - digest = "1:878f0defa9b853f9acfaf4a162ba450a89d0050eff084f9fe7f5bd15948f172a" name = "github.com/gregjones/httpcache" packages = [ ".", - "diskcache", + "diskcache" ] - pruneopts = "UT" revision = "787624de3eb7bd915c329cba748687a3b22666a6" [[projects]] - digest = "1:bff41b67e290a59f174fb0f8689d7aba87294cded76fa0967718e1ce6d362426" name = "github.com/grpc-ecosystem/go-grpc-prometheus" packages = ["."] - pruneopts = "UT" revision = "2500245aa6110c562d17020fb31a2c133d737799" [[projects]] - digest = "1:3f90d23757c18b1e07bf11494dbe737ee2c44d881c0f41e681611abdadad62fa" name = "github.com/hashicorp/golang-lru" packages = [ ".", - "simplelru", + "simplelru" ] - pruneopts = "UT" revision = "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" [[projects]] - digest = "1:0292f7d08f3d0119b49ab0bd59719e25f263e8a9b3f82ce34cbf675ad48dbbd2" name = "github.com/hashicorp/hcl" packages = [ ".", @@ -693,89 +571,67 @@ "hcl/token", "json/parser", "json/scanner", - "json/token", + "json/token" ] - pruneopts = "UT" revision = "d8c773c4cba11b11539e3d45f93daeaa5dcf1fa1" [[projects]] - digest = "1:80544abec6a93301c477926d6ed12dffce5029ddb34101435d88277f98006844" name = "github.com/huandu/xstrings" packages = ["."] - pruneopts = "UT" revision = "3959339b333561bf62a38b424fd41517c2c90f40" [[projects]] - digest = "1:3e260afa138eab6492b531a3b3d10ab4cb70512d423faa78b8949dec76e66a21" name = "github.com/imdario/mergo" packages = ["."] - pruneopts = "UT" revision = "9316a62528ac99aaecb4e47eadd6dc8aa6533d58" [[projects]] - digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" name = "github.com/inconshreveable/mousetrap" packages = ["."] - pruneopts = "UT" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" [[projects]] - digest = "1:e22af8c7518e1eab6f2eab2b7d7558927f816262586cd6ed9f349c97a6c285c4" name = "github.com/jmespath/go-jmespath" packages = ["."] - pruneopts = "UT" revision = "0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74" [[projects]] - digest = "1:70e697d67ccaec45e16bac3a32380ebcd9e7e071079c60d0171d42cf1cf9748a" name = "github.com/joho/godotenv" packages = ["."] - pruneopts = "UT" revision = "a79fa1e548e2c689c241d10173efd51e5d689d5b" version = "v1.2.0" [[projects]] - digest = "1:e904ebe3c17ef07eb107df3f9453a2e678c289a5265d2c7314c6d5ba5ac3b085" name = "github.com/jonboulle/clockwork" packages = ["."] - pruneopts = "UT" revision = "72f9bd7c4e0c2a40055ab3d0f09654f730cce982" [[projects]] - digest = "1:b6bbd2f9e0724bd81890c8644259f920c6d61c08453978faff0bebd25f3e7d3e" name = "github.com/jpillora/backoff" packages = ["."] - pruneopts = "UT" revision = "8eab2debe79d12b7bd3d10653910df25fa9552ba" version = "1.0.0" [[projects]] - digest = "1:bb3cc4c1b21ea18cfa4e3e47440fc74d316ab25b0cf42927e8c1274917bd9891" name = "github.com/json-iterator/go" packages = ["."] - pruneopts = "UT" revision = "f2b4162afba35581b6d4a50d3b8f34e33c144682" [[projects]] - digest = "1:68a21d98a9a22099581b3c76d5478d65c73dd58c7a32262636cb11deb99c02ec" name = "github.com/jteeuwen/go-bindata" packages = [ ".", - "go-bindata", + "go-bindata" ] - pruneopts = "UT" revision = "a0ff2567cfb70903282db057e799fd826784d41d" [[projects]] branch = "master" - digest = "1:81780a09277ee80f2bfbb90da6f51b5de95423db6cde8ff6d72cd20eba989bba" name = "github.com/kr/fs" packages = ["."] - pruneopts = "UT" revision = "2788f0dbd16903de03cb8186e5c7d97b69ad387b" [[projects]] - digest = "1:0be87127b6c732fce41682f21ec87fde73c7a388062d79ca99dd28bfa8cb4021" name = "github.com/kubernetes-incubator/apiserver-builder" packages = [ "cmd/apiregister-gen", @@ -787,307 +643,231 @@ "cmd/apiserver-boot/boot/run", "cmd/apiserver-boot/boot/update", "cmd/apiserver-boot/boot/util", - "cmd/apiserver-boot/boot/version", + "cmd/apiserver-boot/boot/version" ] - pruneopts = "UT" revision = "e809ac2f9f0c238f08d08a876f8b3f499604f941" [[projects]] - digest = "1:53baa5030380b1ea774231b7e1f4f1a1ee7958118fba826bc391a0c06a06df03" name = "github.com/kubernetes-incubator/reference-docs" packages = [ "gen-apidocs", "gen-apidocs/generators", - "gen-apidocs/generators/api", + "gen-apidocs/generators/api" ] - pruneopts = "UT" revision = "8fadf91876ccbcfec367b434706a3c449073b0b4" [[projects]] - digest = "1:4007d130ea960ece2c12269732e7d6002b8db1e1c5276be236e18440350e2e52" name = "github.com/magiconair/properties" packages = ["."] - pruneopts = "UT" revision = "61b492c03cf472e0c6419be5899b8e0dc28b1b88" [[projects]] - digest = "1:a867990aee2ebc1ac86614ed702bf1e63061a79eac12d4326203cb9084b61839" name = "github.com/mailru/easyjson" packages = [ "buffer", "jlexer", - "jwriter", + "jwriter" ] - pruneopts = "UT" revision = "2f5df55504ebc322e4d52d34df6a1f5b503bf26d" [[projects]] branch = "master" - digest = "1:91ba3351f61d305d760dbc04084e17ef013ba45cdc7675a2f8ce6028d5f59430" name = "github.com/markbates/inflect" packages = ["."] - pruneopts = "UT" revision = "fbc6b23ce49e2578f572d2e72bb72fa03c7145de" [[projects]] - digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] - pruneopts = "UT" revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" [[projects]] - digest = "1:54ba55da3020def54720e6cfc21a76bdaf67d5bdc06752b2789e73fcebd866fc" name = "github.com/miekg/coredns" packages = ["middleware/etcd/msg"] - pruneopts = "UT" revision = "20e25559d5eada5a68a0720816a6e947b94860ce" [[projects]] - digest = "1:7e6d99ab68191943e11e8a3711bad7424803c94c7d91fb834d4bb79ccb1e3a19" name = "github.com/miekg/dns" packages = ["."] - pruneopts = "UT" revision = "5d001d020961ae1c184f9f8152fdc73810481677" [[projects]] branch = "master" - digest = "1:e68cd472b96cdf7c9f6971ac41bcc1d4d3b23d67c2a31d2399446e295bc88ae9" name = "github.com/mitchellh/go-wordwrap" packages = ["."] - pruneopts = "UT" revision = "ad45545899c7b13c020ea92b2072220eefad42b8" [[projects]] - digest = "1:3bf49f179b730bede84bcec58587f33af244353cc7029283c82de81729e75fae" name = "github.com/mitchellh/mapstructure" packages = ["."] - pruneopts = "UT" revision = "53818660ed4955e899c0bcafa97299a388bd7c8e" [[projects]] - digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563" name = "github.com/modern-go/concurrent" packages = ["."] - pruneopts = "UT" revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" version = "1.0.3" [[projects]] - digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855" name = "github.com/modern-go/reflect2" packages = ["."] - pruneopts = "UT" revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" version = "1.0.1" [[projects]] branch = "master" - digest = "1:a6156889b651cc0bf3d9bef82b6ba8fbb9eb19aefd7bc5718357c38b67297cbc" name = "github.com/mxk/go-flowrate" packages = ["flowrate"] - pruneopts = "UT" revision = "cca7078d478f8520f85629ad7c68962d31ed7682" [[projects]] - digest = "1:37423212694a4316f48e0bbac8e4f1fd366a384a286fbaa7d80baf99d86f0416" name = "github.com/opencontainers/go-digest" packages = ["."] - pruneopts = "UT" revision = "a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb" [[projects]] - digest = "1:8e1d3df780654a0c2227b1a4d6f11bfb46d386237f31cc8b5ae8dfa13b55b4ee" name = "github.com/opencontainers/image-spec" packages = [ "specs-go", - "specs-go/v1", + "specs-go/v1" ] - pruneopts = "UT" revision = "372ad780f63454fbbbbcc7cf80e5b90245c13e13" [[projects]] - digest = "1:9072181164e616e422cbfbe48ca9ac249a4d76301ca0876c9f56b937cf214a2f" name = "github.com/pborman/uuid" packages = ["."] - pruneopts = "UT" revision = "ca53cad383cad2479bbba7f7a1a05797ec1386e4" [[projects]] - digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" name = "github.com/pelletier/go-toml" packages = ["."] - pruneopts = "UT" revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" [[projects]] branch = "master" - digest = "1:3bf17a6e6eaa6ad24152148a631d18662f7212e21637c2699bff3369b7f00fa2" name = "github.com/petar/GoLLRB" packages = ["llrb"] - pruneopts = "UT" revision = "53be0d36a84c2a886ca057d34b6aa4468df9ccb4" [[projects]] - digest = "1:0e7775ebbcf00d8dd28ac663614af924411c868dca3d5aa762af0fae3808d852" name = "github.com/peterbourgon/diskv" packages = ["."] - pruneopts = "UT" revision = "5f041e8faa004a95c88a202771f4cc3e991971e6" [[projects]] - digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747" name = "github.com/pkg/errors" packages = ["."] - pruneopts = "UT" revision = "645ef00459ed84a119197bfb8d8205042c6df63d" [[projects]] - digest = "1:8c2de3d113427f30484c85b8fdb3286a567e2af8e60b379f8d85e3af90e20089" name = "github.com/pkg/sftp" packages = ["."] - pruneopts = "UT" revision = "4d0e916071f68db74f8a73926335f809396d6b42" [[projects]] - digest = "1:08413c4235cad94a96c39e1e2f697789733c4a87d1fdf06b412d2cf2ba49826a" name = "github.com/pmezard/go-difflib" packages = ["difflib"] - pruneopts = "UT" revision = "d8ed2627bdf02c080bf22230dbb337003b7aba2d" [[projects]] - digest = "1:5ea1368c1be4bf21c05cffe69e2341c0ee354ce5c7ed45291d8abd6ceea1ddeb" name = "github.com/prometheus/client_golang" packages = [ "prometheus", - "prometheus/promhttp", + "prometheus/promhttp" ] - pruneopts = "UT" revision = "e7e903064f5e9eb5da98208bae10b475d4db0f8c" [[projects]] - digest = "1:9fe8945a11a9f588a9d306b4741cad634da9015a704271b9506810e2cc77fa17" name = "github.com/prometheus/client_model" packages = ["go"] - pruneopts = "UT" revision = "fa8ad6fec33561be4280a8f0514318c79d7f6cb6" [[projects]] - digest = "1:0d5f8e2195ad2beef202367f3217c4a7981582d96ccf4876b9aa2c5c9c9b3510" name = "github.com/prometheus/common" packages = [ "expfmt", "internal/bitbucket.org/ww/goautoneg", - "model", + "model" ] - pruneopts = "UT" revision = "13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207" [[projects]] - digest = "1:c78edab144d03422b52cd34d5fa4ffc9a59fef90b3afdcf2efc4dd333479f243" name = "github.com/prometheus/procfs" packages = [ ".", - "xfs", + "xfs" ] - pruneopts = "UT" revision = "65c1f6f8f0fc1e2185eb9863a3bc751496404259" [[projects]] - digest = "1:35805e88a1ce71dfafdeb54d6b075b668f7b559c1dd9071024c960bb65c2f2cf" name = "github.com/renstrom/dedent" packages = ["."] - pruneopts = "UT" revision = "020d11c3b9c0c7a3c2efcc8e5cf5b9ef7bcea21f" [[projects]] - digest = "1:f78dee1142c1e43c9288534cadfa82f21dfd9a1163b06fa0fdf872f8020f2a53" name = "github.com/russross/blackfriday" packages = ["."] - pruneopts = "UT" revision = "300106c228d52c8941d4b3de6054a6062a86dda3" [[projects]] - digest = "1:e589afe1921e2b183b1cc58a06d7b36ee703a1fdb3cfc41370903c75a5d00b2a" name = "github.com/satori/go.uuid" packages = ["."] - pruneopts = "UT" revision = "5bf94b69c6b68ee1b541973bb8e1144db23a194b" [[projects]] - digest = "1:8f9dbaa6f7247268be0b1248eeb7b2a4216a3de96b97d9ce1924842a8c3af28e" name = "github.com/sergi/go-diff" packages = ["diffmatchpatch"] - pruneopts = "UT" revision = "552b4e9bbdca9e5adafd95ee98c822fdd11b330b" [[projects]] - digest = "1:166006f557f8035424fad136d1806d5c73229e82c670500dcbfba1a1160f5ddb" name = "github.com/shurcooL/sanitized_anchor_name" packages = ["."] - pruneopts = "UT" revision = "10ef21a441db47d8b13ebcc5fd2310f636973c77" [[projects]] - digest = "1:fb011abd58a582cf867409273f372fc6437eda670ff02055c47e6203e90466d7" name = "github.com/sirupsen/logrus" packages = ["."] - pruneopts = "UT" revision = "89742aefa4b206dcf400792f3bd35b542998eb3b" [[projects]] - digest = "1:c10331981912057a246099d926a3f9513cbac59c17c4a05919b7177edb1bed46" name = "github.com/spf13/afero" packages = [ ".", "mem", - "sftp", + "sftp" ] - pruneopts = "UT" revision = "b28a7effac979219c2a2ed6205a4d70e4b1bcd02" [[projects]] - digest = "1:0795f190d861516d86f1ce7bfedf33f60034b0607984df43cd63b6f2b9730442" name = "github.com/spf13/cast" packages = ["."] - pruneopts = "UT" revision = "e31f36ffc91a2ba9ddb72a4b6a607ff9b3d3cb63" [[projects]] - digest = "1:e12ae69bc149ccb2c75ba6d4525252aecda7bcbdd74515cbe24c38d547dbc56f" name = "github.com/spf13/cobra" packages = [ ".", - "doc", + "doc" ] - pruneopts = "UT" revision = "c439c4fa093711d42e1b01acb1235b52004753c1" [[projects]] - digest = "1:16c1437fdd40ea6e3419868c7ee065376bb36c660c63d86dc858bdf05d20033d" name = "github.com/spf13/jwalterweatherman" packages = ["."] - pruneopts = "UT" revision = "33c24e77fb80341fe7130ee7c594256ff08ccc46" [[projects]] - digest = "1:9424f440bba8f7508b69414634aef3b2b3a877e522d8a4624692412805407bb7" name = "github.com/spf13/pflag" packages = ["."] - pruneopts = "UT" revision = "583c0c0531f06d5278b7d917446061adc344b5cd" [[projects]] - digest = "1:46d7c8b4e894a52c758de95a458a0d832b82e7f6c741e952d91d22d5a998a878" name = "github.com/spf13/viper" packages = ["."] - pruneopts = "UT" revision = "7fb2782df3d83e0036cc89f461ed0422628776f4" [[projects]] branch = "master" - digest = "1:1c5e9c80b7f295cb22373c59300c27c27c122a9c07410a6505b137afacf3583c" name = "github.com/spotinst/spotinst-sdk-go" packages = [ "service/elastigroup", @@ -1101,43 +881,33 @@ "spotinst/session", "spotinst/util/jsonutil", "spotinst/util/stringutil", - "spotinst/util/uritemplates", + "spotinst/util/uritemplates" ] - pruneopts = "UT" revision = "fed4677dbf8fe026a81e09e66fc38d863d091f9b" [[projects]] - digest = "1:67ba0f5b63fa937e1e78273904a1fa0f7c2358c4dac967ac16e678f8e50e8aa5" name = "github.com/stretchr/testify" packages = ["assert"] - pruneopts = "UT" revision = "c679ae2cc0cb27ec3293fea7e254e47386f05d69" [[projects]] branch = "master" - digest = "1:595e123593925253dd02152777ddb8cd42300c4f61e783e163b053802547c47c" name = "github.com/tent/http-link-go" packages = ["."] - pruneopts = "UT" revision = "ac974c61c2f990f4115b119354b5e0b47550e888" [[projects]] - digest = "1:a02bd33c56ab567d53246eeb40c76810c339af9fff7e43b5dd266f7d58d7ca4a" name = "github.com/ugorji/go" packages = ["codec"] - pruneopts = "UT" revision = "ded73eae5db7e7a0ef6f55aace87a2873c5d2b74" [[projects]] - digest = "1:b24d38b282bacf9791408a080f606370efa3d364e4b5fd9ba0f7b87786d3b679" name = "github.com/urfave/cli" packages = ["."] - pruneopts = "UT" revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" version = "v1.20.0" [[projects]] - digest = "1:b575d4cacd3e7a1096aeae9c6b713b967e48b747852895c74e1330847373f8ab" name = "github.com/vmware/govmomi" packages = [ ".", @@ -1155,36 +925,28 @@ "vim25/progress", "vim25/soap", "vim25/types", - "vim25/xml", + "vim25/xml" ] - pruneopts = "UT" revision = "22f74650cf39ba4649fba45e770df0f44df6f758" [[projects]] - digest = "1:6c433fd8510cfde877f6599a7284246ee11829e6250205a29c86f6a8e1976829" name = "github.com/weaveworks/mesh" packages = ["."] - pruneopts = "UT" revision = "1f158d31de55abf9f97bbaa0a260e2b8023a3785" [[projects]] - digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" name = "go.uber.org/atomic" packages = ["."] - pruneopts = "UT" revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" version = "v1.3.2" [[projects]] - digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a" name = "go.uber.org/multierr" packages = ["."] - pruneopts = "UT" revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a" version = "v1.1.0" [[projects]] - digest = "1:9580b1b079114140ade8cec957685344d14f00119e0241f6b369633cb346eeb3" name = "go.uber.org/zap" packages = [ ".", @@ -1192,14 +954,12 @@ "internal/bufferpool", "internal/color", "internal/exit", - "zapcore", + "zapcore" ] - pruneopts = "UT" revision = "eeedf312bc6c57391d84767a4cd413f02a917974" version = "v1.8.0" [[projects]] - digest = "1:19e31c525bada0ceb0ffa11a708fc22e2a93bf86141a0df8227e3b30ce3c5e71" name = "golang.org/x/crypto" packages = [ "curve25519", @@ -1213,13 +973,11 @@ "salsa20/salsa", "scrypt", "ssh", - "ssh/terminal", + "ssh/terminal" ] - pruneopts = "UT" revision = "49796115aa4b964c318aad4f3084fdb41e9aa067" [[projects]] - digest = "1:b2f8f3034a6ed8b65e948001480ac2154b1a3deaaca596302d242b100eabd1dd" name = "golang.org/x/net" packages = [ "context", @@ -1233,36 +991,30 @@ "lex/httplex", "proxy", "trace", - "websocket", + "websocket" ] - pruneopts = "UT" revision = "1c05540f6879653db88113bc4a2b70aec4bd491f" [[projects]] - digest = "1:ad764db92ed977f803ff0f59a7a957bf65cc4e8ae9dfd08228e1f54ea40392e0" name = "golang.org/x/oauth2" packages = [ ".", "google", "internal", "jws", - "jwt", + "jwt" ] - pruneopts = "UT" revision = "a6bd8cefa1811bd24b86f8902872e4e8225f74c4" [[projects]] - digest = "1:e1a85d3648114c446b2874647bf30f646a8594e7e4e45db87fe962aba60e51f5" name = "golang.org/x/sys" packages = [ "unix", - "windows", + "windows" ] - pruneopts = "UT" revision = "95c6576299259db960f6c5b9b69ea52422860fce" [[projects]] - digest = "1:16cd7c873369dc2c42155cad1bc9ea83409e52e3b68f185a3084fb6b84007465" name = "golang.org/x/text" packages = [ "cases", @@ -1285,31 +1037,25 @@ "unicode/cldr", "unicode/norm", "unicode/rangetable", - "width", + "width" ] - pruneopts = "UT" revision = "b19bf474d317b857955b12035d2c5acb57ce8b01" [[projects]] - digest = "1:c9e7a4b4d47c0ed205d257648b0e5b0440880cb728506e318f8ac7cd36270bc4" name = "golang.org/x/time" packages = ["rate"] - pruneopts = "UT" revision = "fbb02b2291d28baffd63558aa44b4b56f178d650" [[projects]] - digest = "1:3dd8cbd912666a80bce62b0b6e2e6c664cd8e56935c5498997000042961a6e6f" name = "golang.org/x/tools" packages = [ "go/ast/astutil", "go/vcs", - "imports", + "imports" ] - pruneopts = "UT" revision = "2382e3994d48b1d22acc2c86bcad0a2aff028e32" [[projects]] - digest = "1:a7309a4737718d95244983791235f7965e1274d50b675b5e05b03f2c5daf8359" name = "google.golang.org/api" packages = [ "compute/v0.alpha", @@ -1323,13 +1069,11 @@ "iam/v1", "oauth2/v2", "storage/v1", - "tpu/v1", + "tpu/v1" ] - pruneopts = "UT" revision = "3639d6d93f377f39a1de765fa4ef37b3c7ca8bd9" [[projects]] - digest = "1:a48f97fb737d5d61cf13e81cfef040942d217d086766b823757d39d4f6a4c547" name = "google.golang.org/appengine" packages = [ ".", @@ -1341,24 +1085,20 @@ "internal/modules", "internal/remote_api", "internal/urlfetch", - "urlfetch", + "urlfetch" ] - pruneopts = "UT" revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" version = "v1.0.0" [[projects]] - digest = "1:0efcfe82e59b828eb6f4115bba88ff45c0898c38e823fbe7f450bdffed9e739b" name = "google.golang.org/genproto" packages = [ "googleapis/api/annotations", - "googleapis/rpc/status", + "googleapis/rpc/status" ] - pruneopts = "UT" revision = "09f6ed296fc66555a25fe4ce95173148778dfa85" [[projects]] - digest = "1:45101b53b1b93d50e2464e3b164bfa72cc77229fb998cfcd029987006488c641" name = "google.golang.org/grpc" packages = [ ".", @@ -1378,65 +1118,51 @@ "stats", "status", "tap", - "transport", + "transport" ] - pruneopts = "UT" revision = "5b3c4e850e90a4cf6a20ebd46c8b32a0a3afcb9e" [[projects]] - digest = "1:81e285039f8cfb5660c3a07858b40884f80df28486953e6bf845405b306f2487" name = "gopkg.in/gcfg.v1" packages = [ ".", "scanner", "token", - "types", + "types" ] - pruneopts = "UT" revision = "27e4946190b4a327b539185f2b5b1f7c84730728" [[projects]] - digest = "1:ef72505cf098abdd34efeea032103377bec06abb61d8a06f002d5d296a4b1185" name = "gopkg.in/inf.v0" packages = ["."] - pruneopts = "UT" revision = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4" [[projects]] - digest = "1:74075f052f91808a4299b45b231aa5f7e2ccd3bac4ec4a5f832468485d91b9d3" name = "gopkg.in/natefinch/lumberjack.v2" packages = ["."] - pruneopts = "UT" revision = "20b71e5b60d756d3d2f80def009790325acc2b23" [[projects]] - digest = "1:517fc596d15da8456fefaa85bcff18dd2068ade58f1e108997c2456ff0e83d3d" name = "gopkg.in/square/go-jose.v2" packages = [ ".", "cipher", "json", - "jwt", + "jwt" ] - pruneopts = "UT" revision = "89060dee6a84df9a4dae49f676f0c755037834f1" [[projects]] - digest = "1:9df3443440bf95dc72f21ffc33300eca3975edf4b899af969a577879afe551de" name = "gopkg.in/warnings.v0" packages = ["."] - pruneopts = "UT" revision = "8a331561fe74dadba6edfc59f3be66c22c3b065d" [[projects]] - digest = "1:fa62cd569ff15e4dba6dfc6d826e97a7913ef299eccd5804c9d614a84863e485" name = "gopkg.in/yaml.v2" packages = ["."] - pruneopts = "UT" revision = "670d4cfef0544295bc27a114dbac37980d83185a" [[projects]] - digest = "1:16e3493f1ebd6e2c9bf2f05a2c0f0f23bd8bd346dfa27bfc5ccd29d2b77f900c" name = "k8s.io/api" packages = [ "admission/v1beta1", @@ -1471,22 +1197,18 @@ "settings/v1alpha1", "storage/v1", "storage/v1alpha1", - "storage/v1beta1", + "storage/v1beta1" ] - pruneopts = "UT" revision = "b503174bad5991eb66f18247f52e41c3258f6348" version = "kubernetes-1.12.3" [[projects]] - digest = "1:fa432f3acd7631bca4888e8d0f1db60cc46aef6a2d85a7f87f0ade54ea0ba56e" name = "k8s.io/apiextensions-apiserver" packages = ["pkg/features"] - pruneopts = "UT" revision = "0cd23ebeb6882bd1cdc2cb15fc7b2d72e8a86a5b" version = "kubernetes-1.12.3" [[projects]] - digest = "1:4e7e59a0d72e4be3bf977a19a9830bb8a8ddbfab8f05d8e2107293c8a5270b7c" name = "k8s.io/apimachinery" packages = [ "pkg/api/equality", @@ -1545,14 +1267,12 @@ "pkg/watch", "third_party/forked/golang/json", "third_party/forked/golang/netutil", - "third_party/forked/golang/reflect", + "third_party/forked/golang/reflect" ] - pruneopts = "UT" revision = "eddba98df674a16931d2d4ba75edc3a389bf633a" version = "kubernetes-1.12.3" [[projects]] - digest = "1:a47fe8a5f2e77403d8a7000596f3e636b29cc8ca316f7f10921d1df76e0b1321" name = "k8s.io/apiserver" packages = [ "pkg/admission", @@ -1647,26 +1367,22 @@ "plugin/pkg/audit/truncate", "plugin/pkg/audit/webhook", "plugin/pkg/authenticator/token/webhook", - "plugin/pkg/authorizer/webhook", + "plugin/pkg/authorizer/webhook" ] - pruneopts = "UT" revision = "92fdef3a232a23afb9644f6151119b5961b9feab" version = "kubernetes-1.12.3" [[projects]] branch = "master" - digest = "1:9fefce8370f58ca7701e82309446bd72ca765a1c5da83207857cebbc1bd9aeb2" name = "k8s.io/cli-runtime" packages = [ "pkg/genericclioptions", "pkg/genericclioptions/printers", - "pkg/genericclioptions/resource", + "pkg/genericclioptions/resource" ] - pruneopts = "UT" revision = "0848ac45ae52dd684c82242dfb4e5de83399d4f2" [[projects]] - digest = "1:bd6d44580a9f4585ab6ab56706060d52932ce8b005909cb908e2f144671936e6" name = "k8s.io/client-go" packages = [ "discovery", @@ -1854,14 +1570,12 @@ "util/homedir", "util/integer", "util/jsonpath", - "util/retry", + "util/retry" ] - pruneopts = "UT" revision = "d082d5923d3cc0bfbb066ee5fbdea3d0ca79acf8" version = "kubernetes-1.12.3" [[projects]] - digest = "1:4e2addcdbe0330f43800c1fcb905fc7a21b86415dfcca619e5c606c87257af1b" name = "k8s.io/code-generator" packages = [ "cmd/client-gen", @@ -1881,27 +1595,23 @@ "cmd/defaulter-gen/args", "cmd/openapi-gen", "cmd/openapi-gen/args", - "pkg/util", + "pkg/util" ] - pruneopts = "T" revision = "3dcf91f64f638563e5106f21f50c31fa361c918d" version = "kubernetes-1.12.3" [[projects]] branch = "master" - digest = "1:04c357e028e6f95c63b28b806d489d5908051b69a476a95305f5243c1c32141d" name = "k8s.io/csi-api" packages = [ "pkg/apis/csi/v1alpha1", "pkg/client/clientset/versioned", "pkg/client/clientset/versioned/scheme", - "pkg/client/clientset/versioned/typed/csi/v1alpha1", + "pkg/client/clientset/versioned/typed/csi/v1alpha1" ] - pruneopts = "UT" revision = "55e69c84e236c638e35d7726b50181b507d35c22" [[projects]] - digest = "1:fb0b799b5c7bd70d1cef3537e864457291f62e5a2e94ab659232e9958be5a869" name = "k8s.io/gengo" packages = [ "args", @@ -1911,21 +1621,17 @@ "generator", "namer", "parser", - "types", + "types" ] - pruneopts = "UT" revision = "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" [[projects]] - digest = "1:2578ea84d8555a62f49e5f750848ec5d3bad2e5ba9e3977186e407c7501d3b95" name = "k8s.io/helm" packages = ["pkg/strvals"] - pruneopts = "UT" revision = "f6025bb9ee7daf9fee0026541c90a6f557a3e0bc" version = "v2.9.0" [[projects]] - digest = "1:3ed676d888b0a53cc0de46209ed8b27672a188fcf66886cdb1791029ec5d5028" name = "k8s.io/kube-openapi" packages = [ "cmd/openapi-gen/args", @@ -1937,13 +1643,11 @@ "pkg/util", "pkg/util/proto", "pkg/util/proto/validation", - "pkg/util/sets", + "pkg/util/sets" ] - pruneopts = "UT" revision = "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" [[projects]] - digest = "1:e5af305bed43ec95303ff4206940c2339cb52137359e38bc924c87bfd19d158e" name = "k8s.io/kubernetes" packages = [ "pkg/api/events", @@ -2126,14 +1830,12 @@ "pkg/volume/util/fs", "pkg/volume/util/recyclerclient", "pkg/volume/util/types", - "pkg/volume/util/volumepathhandler", + "pkg/volume/util/volumepathhandler" ] - pruneopts = "UT" revision = "435f92c719f279a3a67808c80521ea17d5715c66" version = "v1.12.3" [[projects]] - digest = "1:f86bc539772df0ae5d4245697dc882ae1ade82c5800da74ba921df757ab3c66a" name = "k8s.io/metrics" packages = [ "pkg/apis/metrics", @@ -2142,223 +1844,27 @@ "pkg/client/clientset/versioned", "pkg/client/clientset/versioned/scheme", "pkg/client/clientset/versioned/typed/metrics/v1alpha1", - "pkg/client/clientset/versioned/typed/metrics/v1beta1", + "pkg/client/clientset/versioned/typed/metrics/v1beta1" ] - pruneopts = "UT" revision = "bbe7891c54bfbd56e7ac43c280318ec6cd8cca55" version = "kubernetes-1.12.3" [[projects]] - digest = "1:ae10a16a74957e6cda3836ba64ec1b052b4707d66923cede097db76dc372e09f" name = "k8s.io/utils" packages = [ "exec", - "pointer", + "pointer" ] - pruneopts = "UT" revision = "1bd4f387aa67de2eec07a362c10bc8bd7fe74237" [[projects]] - digest = "1:96f9b7c99c55e6063371088376d57d398f42888dedd08ab5d35065aba11e3965" name = "vbom.ml/util" packages = ["sortorder"] - pruneopts = "UT" revision = "db5cfe13f5cc80a4990d98e2e1b0707a4d1a5394" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - input-imports = [ - "cloud.google.com/go/compute/metadata", - "github.com/MakeNowJust/heredoc", - "github.com/Masterminds/sprig", - "github.com/aws/aws-sdk-go/aws", - "github.com/aws/aws-sdk-go/aws/awserr", - "github.com/aws/aws-sdk-go/aws/client", - "github.com/aws/aws-sdk-go/aws/credentials", - "github.com/aws/aws-sdk-go/aws/ec2metadata", - "github.com/aws/aws-sdk-go/aws/endpoints", - "github.com/aws/aws-sdk-go/aws/request", - "github.com/aws/aws-sdk-go/aws/session", - "github.com/aws/aws-sdk-go/service/autoscaling", - "github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface", - "github.com/aws/aws-sdk-go/service/cloudformation", - "github.com/aws/aws-sdk-go/service/ec2", - "github.com/aws/aws-sdk-go/service/ec2/ec2iface", - "github.com/aws/aws-sdk-go/service/elb", - "github.com/aws/aws-sdk-go/service/elb/elbiface", - "github.com/aws/aws-sdk-go/service/elbv2", - "github.com/aws/aws-sdk-go/service/elbv2/elbv2iface", - "github.com/aws/aws-sdk-go/service/iam", - "github.com/aws/aws-sdk-go/service/iam/iamiface", - "github.com/aws/aws-sdk-go/service/pricing", - "github.com/aws/aws-sdk-go/service/route53", - "github.com/aws/aws-sdk-go/service/route53/route53iface", - "github.com/aws/aws-sdk-go/service/s3", - "github.com/bazelbuild/bazel-gazelle/cmd/gazelle", - "github.com/blang/semver", - "github.com/client9/misspell/cmd/misspell", - "github.com/coreos/etcd/client", - "github.com/denverdino/aliyungo/common", - "github.com/denverdino/aliyungo/ecs", - "github.com/denverdino/aliyungo/ess", - "github.com/denverdino/aliyungo/oss", - "github.com/denverdino/aliyungo/ram", - "github.com/denverdino/aliyungo/slb", - "github.com/digitalocean/godo", - "github.com/digitalocean/godo/context", - "github.com/docker/engine-api/client", - "github.com/docker/engine-api/types", - "github.com/fullsailor/pkcs7", - "github.com/ghodss/yaml", - "github.com/go-ini/ini", - "github.com/go-openapi/spec", - "github.com/gogo/protobuf/gogoproto", - "github.com/gogo/protobuf/proto", - "github.com/gogo/protobuf/sortkeys", - "github.com/golang/glog", - "github.com/golang/protobuf/proto", - "github.com/google/cadvisor/pages/static", - "github.com/gophercloud/gophercloud", - "github.com/gophercloud/gophercloud/openstack", - "github.com/gophercloud/gophercloud/openstack/blockstorage/v2/volumes", - "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/keypairs", - "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/schedulerhints", - "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/servergroups", - "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/routers", - "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/groups", - "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules", - "github.com/gophercloud/gophercloud/openstack/networking/v2/networks", - "github.com/gophercloud/gophercloud/openstack/networking/v2/ports", - "github.com/gophercloud/gophercloud/openstack/networking/v2/subnets", - "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers", - "github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects", - "github.com/gophercloud/gophercloud/pagination", - "github.com/gorilla/mux", - "github.com/hashicorp/hcl/hcl/ast", - "github.com/hashicorp/hcl/hcl/printer", - "github.com/hashicorp/hcl/json/parser", - "github.com/jpillora/backoff", - "github.com/jteeuwen/go-bindata/go-bindata", - "github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen", - "github.com/kubernetes-incubator/apiserver-builder/cmd/apiserver-boot", - "github.com/kubernetes-incubator/reference-docs/gen-apidocs", - "github.com/miekg/coredns/middleware/etcd/msg", - "github.com/miekg/dns", - "github.com/pborman/uuid", - "github.com/pkg/errors", - "github.com/pkg/sftp", - "github.com/prometheus/client_golang/prometheus", - "github.com/prometheus/client_golang/prometheus/promhttp", - "github.com/sergi/go-diff/diffmatchpatch", - "github.com/spf13/cobra", - "github.com/spf13/cobra/doc", - "github.com/spf13/pflag", - "github.com/spf13/viper", - "github.com/spotinst/spotinst-sdk-go/service/elastigroup", - "github.com/spotinst/spotinst-sdk-go/service/elastigroup/providers/aws", - "github.com/spotinst/spotinst-sdk-go/spotinst", - "github.com/spotinst/spotinst-sdk-go/spotinst/client", - "github.com/spotinst/spotinst-sdk-go/spotinst/credentials", - "github.com/spotinst/spotinst-sdk-go/spotinst/log", - "github.com/spotinst/spotinst-sdk-go/spotinst/session", - "github.com/spotinst/spotinst-sdk-go/spotinst/util/stringutil", - "github.com/stretchr/testify/assert", - "github.com/urfave/cli", - "github.com/vmware/govmomi", - "github.com/vmware/govmomi/find", - "github.com/vmware/govmomi/object", - "github.com/vmware/govmomi/property", - "github.com/vmware/govmomi/vim25", - "github.com/vmware/govmomi/vim25/mo", - "github.com/vmware/govmomi/vim25/soap", - "github.com/vmware/govmomi/vim25/types", - "github.com/weaveworks/mesh", - "go.uber.org/zap", - "golang.org/x/crypto/ssh", - "golang.org/x/net/context", - "golang.org/x/oauth2", - "golang.org/x/oauth2/google", - "google.golang.org/api/compute/v0.beta", - "google.golang.org/api/compute/v1", - "google.golang.org/api/dns/v1", - "google.golang.org/api/googleapi", - "google.golang.org/api/iam/v1", - "google.golang.org/api/oauth2/v2", - "google.golang.org/api/storage/v1", - "gopkg.in/gcfg.v1", - "gopkg.in/yaml.v2", - "k8s.io/api/core/v1", - "k8s.io/api/extensions/v1beta1", - "k8s.io/api/rbac/v1beta1", - "k8s.io/apimachinery/pkg/api/errors", - "k8s.io/apimachinery/pkg/api/meta", - "k8s.io/apimachinery/pkg/api/resource", - "k8s.io/apimachinery/pkg/api/validation", - "k8s.io/apimachinery/pkg/apis/meta/v1", - "k8s.io/apimachinery/pkg/conversion", - "k8s.io/apimachinery/pkg/fields", - "k8s.io/apimachinery/pkg/labels", - "k8s.io/apimachinery/pkg/runtime", - "k8s.io/apimachinery/pkg/runtime/schema", - "k8s.io/apimachinery/pkg/runtime/serializer", - "k8s.io/apimachinery/pkg/types", - "k8s.io/apimachinery/pkg/util/errors", - "k8s.io/apimachinery/pkg/util/intstr", - "k8s.io/apimachinery/pkg/util/net", - "k8s.io/apimachinery/pkg/util/runtime", - "k8s.io/apimachinery/pkg/util/sets", - "k8s.io/apimachinery/pkg/util/uuid", - "k8s.io/apimachinery/pkg/util/validation", - "k8s.io/apimachinery/pkg/util/validation/field", - "k8s.io/apimachinery/pkg/util/wait", - "k8s.io/apimachinery/pkg/util/yaml", - "k8s.io/apimachinery/pkg/version", - "k8s.io/apimachinery/pkg/watch", - "k8s.io/apiserver/pkg/authentication/user", - "k8s.io/apiserver/pkg/endpoints/openapi", - "k8s.io/apiserver/pkg/registry/generic", - "k8s.io/apiserver/pkg/registry/generic/registry", - "k8s.io/apiserver/pkg/registry/rest", - "k8s.io/apiserver/pkg/server", - "k8s.io/apiserver/pkg/server/options", - "k8s.io/apiserver/pkg/storage", - "k8s.io/apiserver/pkg/storage/names", - "k8s.io/apiserver/pkg/storage/storagebackend", - "k8s.io/apiserver/pkg/util/logs", - "k8s.io/cli-runtime/pkg/genericclioptions", - "k8s.io/cli-runtime/pkg/genericclioptions/resource", - "k8s.io/client-go/discovery", - "k8s.io/client-go/discovery/fake", - "k8s.io/client-go/kubernetes", - "k8s.io/client-go/kubernetes/fake", - "k8s.io/client-go/kubernetes/scheme", - "k8s.io/client-go/plugin/pkg/client/auth", - "k8s.io/client-go/rest", - "k8s.io/client-go/testing", - "k8s.io/client-go/tools/clientcmd", - "k8s.io/client-go/tools/clientcmd/api", - "k8s.io/client-go/tools/clientcmd/api/v1", - "k8s.io/client-go/util/flowcontrol", - "k8s.io/client-go/util/homedir", - "k8s.io/code-generator/cmd/client-gen", - "k8s.io/code-generator/cmd/conversion-gen", - "k8s.io/code-generator/cmd/deepcopy-gen", - "k8s.io/code-generator/cmd/defaulter-gen", - "k8s.io/code-generator/cmd/openapi-gen", - "k8s.io/helm/pkg/strvals", - "k8s.io/kube-openapi/pkg/common", - "k8s.io/kubernetes/pkg/client/metrics/prometheus", - "k8s.io/kubernetes/pkg/cloudprovider/providers/aws", - "k8s.io/kubernetes/pkg/cloudprovider/providers/gce", - "k8s.io/kubernetes/pkg/kubectl/cmd", - "k8s.io/kubernetes/pkg/kubectl/cmd/templates", - "k8s.io/kubernetes/pkg/kubectl/cmd/util", - "k8s.io/kubernetes/pkg/kubectl/cmd/util/editor", - "k8s.io/kubernetes/pkg/kubectl/util/i18n", - "k8s.io/kubernetes/pkg/util/mount", - "k8s.io/kubernetes/pkg/util/nsenter", - "k8s.io/utils/exec", - ] + inputs-digest = "2dc4b42f3626cc35d2652f8e414ac007cbc222cf83b92116f56dfb9e2fdd5648" solver-name = "gps-cdcl" solver-version = 1 diff --git a/vendor/github.com/asaskevich/govalidator/BUILD.bazel b/vendor/github.com/asaskevich/govalidator/BUILD.bazel deleted file mode 100644 index 598a9ea477..0000000000 --- a/vendor/github.com/asaskevich/govalidator/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "arrays.go", - "converter.go", - "error.go", - "numerics.go", - "patterns.go", - "types.go", - "utils.go", - "validator.go", - ], - importmap = "vendor/github.com/asaskevich/govalidator", - importpath = "github.com/asaskevich/govalidator", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/coreos/etcd/cmd/etcd b/vendor/github.com/coreos/etcd/cmd/etcd deleted file mode 120000 index b870225aa0..0000000000 --- a/vendor/github.com/coreos/etcd/cmd/etcd +++ /dev/null @@ -1 +0,0 @@ -../ \ No newline at end of file diff --git a/vendor/github.com/coreos/etcd/cmd/etcdctl b/vendor/github.com/coreos/etcd/cmd/etcdctl deleted file mode 120000 index 05bb269d60..0000000000 --- a/vendor/github.com/coreos/etcd/cmd/etcdctl +++ /dev/null @@ -1 +0,0 @@ -../etcdctl \ No newline at end of file diff --git a/vendor/github.com/coreos/etcd/cmd/tools b/vendor/github.com/coreos/etcd/cmd/tools deleted file mode 120000 index 4887d6e0c9..0000000000 --- a/vendor/github.com/coreos/etcd/cmd/tools +++ /dev/null @@ -1 +0,0 @@ -../tools \ No newline at end of file diff --git a/vendor/github.com/docker/docker/contrib/selinux-fedora-24/docker-engine-selinux/LICENSE b/vendor/github.com/docker/docker/contrib/selinux-fedora-24/docker-engine-selinux/LICENSE deleted file mode 100644 index d511905c16..0000000000 --- a/vendor/github.com/docker/docker/contrib/selinux-fedora-24/docker-engine-selinux/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/vendor/github.com/docker/docker/contrib/selinux-oraclelinux-7/docker-engine-selinux/LICENSE b/vendor/github.com/docker/docker/contrib/selinux-oraclelinux-7/docker-engine-selinux/LICENSE deleted file mode 100644 index 5b6e7c66c2..0000000000 --- a/vendor/github.com/docker/docker/contrib/selinux-oraclelinux-7/docker-engine-selinux/LICENSE +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/vendor/github.com/docker/docker/contrib/syntax/vim/LICENSE b/vendor/github.com/docker/docker/contrib/syntax/vim/LICENSE deleted file mode 100644 index e67cdabd22..0000000000 --- a/vendor/github.com/docker/docker/contrib/syntax/vim/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Honza Pokorny -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. 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. - -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. diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.default b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.default deleted file mode 120000 index 4278533d65..0000000000 --- a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.default +++ /dev/null @@ -1 +0,0 @@ -../../../contrib/init/sysvinit-debian/docker.default \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.init b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.init deleted file mode 120000 index 8cb89d30dd..0000000000 --- a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.init +++ /dev/null @@ -1 +0,0 @@ -../../../contrib/init/sysvinit-debian/docker \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.upstart b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.upstart deleted file mode 120000 index 7e1b64a3e6..0000000000 --- a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.docker.upstart +++ /dev/null @@ -1 +0,0 @@ -../../../contrib/init/upstart/docker.conf \ No newline at end of file diff --git a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.udev b/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.udev deleted file mode 120000 index 914a361959..0000000000 --- a/vendor/github.com/docker/docker/hack/make/.build-deb/docker-engine.udev +++ /dev/null @@ -1 +0,0 @@ -../../../contrib/udev/80-docker.rules \ No newline at end of file diff --git a/vendor/github.com/go-openapi/errors/BUILD.bazel b/vendor/github.com/go-openapi/errors/BUILD.bazel deleted file mode 100644 index 4f288e5d9d..0000000000 --- a/vendor/github.com/go-openapi/errors/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "api.go", - "auth.go", - "headers.go", - "middleware.go", - "parsing.go", - "schema.go", - ], - importmap = "vendor/github.com/go-openapi/errors", - importpath = "github.com/go-openapi/errors", - visibility = ["//visibility:public"], -) diff --git a/vendor/github.com/go-openapi/strfmt/BUILD.bazel b/vendor/github.com/go-openapi/strfmt/BUILD.bazel deleted file mode 100644 index 9abd651b5c..0000000000 --- a/vendor/github.com/go-openapi/strfmt/BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bson.go", - "date.go", - "default.go", - "doc.go", - "duration.go", - "format.go", - "time.go", - ], - importmap = "vendor/github.com/go-openapi/strfmt", - importpath = "github.com/go-openapi/strfmt", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/asaskevich/govalidator:go_default_library", - "//vendor/github.com/go-openapi/errors:go_default_library", - "//vendor/github.com/mailru/easyjson/jlexer:go_default_library", - "//vendor/github.com/mailru/easyjson/jwriter:go_default_library", - "//vendor/github.com/mitchellh/mapstructure:go_default_library", - "//vendor/gopkg.in/mgo.v2/bson:go_default_library", - ], -) diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones/BUILD.bazel index fd1ebcb11c..fb20c86049 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones", importpath = "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/availabilityzones", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/BUILD.bazel index 4bbba2ae36..b4357dcce1 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips", importpath = "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/floatingips", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach/BUILD.bazel index d136d2eac1..ec45d17f4b 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach", importpath = "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/volumeattach", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/BUILD.bazel index e8c7f85938..8a73a45e67 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets", importpath = "github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/doc.go new file mode 100644 index 0000000000..617fafa631 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/doc.go @@ -0,0 +1,54 @@ +/* +Package recordsets provides information and interaction with the zone API +resource for the OpenStack DNS service. + +Example to List RecordSets by Zone + + listOpts := recordsets.ListOpts{ + Type: "A", + } + + zoneID := "fff121f5-c506-410a-a69e-2d73ef9cbdbd" + + allPages, err := recordsets.ListByZone(dnsClient, zoneID, listOpts).AllPages() + if err != nil { + panic(err) + } + + allRRs, err := recordsets.ExtractRecordSets(allPages() + if err != nil { + panic(err) + } + + for _, rr := range allRRs { + fmt.Printf("%+v\n", rr) + } + +Example to Create a RecordSet + + createOpts := recordsets.CreateOpts{ + Name: "example.com.", + Type: "A", + TTL: 3600, + Description: "This is a recordset.", + Records: []string{"10.1.0.2"}, + } + + zoneID := "fff121f5-c506-410a-a69e-2d73ef9cbdbd" + + rr, err := recordsets.Create(dnsClient, zoneID, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a RecordSet + + zoneID := "fff121f5-c506-410a-a69e-2d73ef9cbdbd" + recordsetID := "d96ed01a-b439-4eb8-9b90-7a9f71017f7b" + + err := recordsets.Delete(dnsClient, zoneID, recordsetID).ExtractErr() + if err != nil { + panic(err) + } +*/ +package recordsets diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/requests.go new file mode 100644 index 0000000000..2d6ecdc3dc --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/requests.go @@ -0,0 +1,166 @@ +package recordsets + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +// ListOptsBuilder allows extensions to add additional parameters to the +// List request. +type ListOptsBuilder interface { + ToRecordSetListQuery() (string, error) +} + +// ListOpts allows the filtering and sorting of paginated collections through +// the API. Filtering is achieved by passing in struct field values that map to +// the server attributes you want to see returned. Marker and Limit are used +// for pagination. +// https://developer.openstack.org/api-ref/dns/ +type ListOpts struct { + // Integer value for the limit of values to return. + Limit int `q:"limit"` + + // UUID of the recordset at which you want to set a marker. + Marker string `q:"marker"` + + Data string `q:"data"` + Description string `q:"description"` + Name string `q:"name"` + SortDir string `q:"sort_dir"` + SortKey string `q:"sort_key"` + Status string `q:"status"` + TTL int `q:"ttl"` + Type string `q:"type"` + ZoneID string `q:"zone_id"` +} + +// ToRecordSetListQuery formats a ListOpts into a query string. +func (opts ListOpts) ToRecordSetListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// ListByZone implements the recordset list request. +func ListByZone(client *gophercloud.ServiceClient, zoneID string, opts ListOptsBuilder) pagination.Pager { + url := baseURL(client, zoneID) + if opts != nil { + query, err := opts.ToRecordSetListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page { + return RecordSetPage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +// Get implements the recordset Get request. +func Get(client *gophercloud.ServiceClient, zoneID string, rrsetID string) (r GetResult) { + _, r.Err = client.Get(rrsetURL(client, zoneID, rrsetID), &r.Body, nil) + return +} + +// CreateOptsBuilder allows extensions to add additional attributes to the +// Create request. +type CreateOptsBuilder interface { + ToRecordSetCreateMap() (map[string]interface{}, error) +} + +// CreateOpts specifies the base attributes that may be used to create a +// RecordSet. +type CreateOpts struct { + // Name is the name of the RecordSet. + Name string `json:"name" required:"true"` + + // Description is a description of the RecordSet. + Description string `json:"description,omitempty"` + + // Records are the DNS records of the RecordSet. + Records []string `json:"records,omitempty"` + + // TTL is the time to live of the RecordSet. + TTL int `json:"ttl,omitempty"` + + // Type is the RRTYPE of the RecordSet. + Type string `json:"type,omitempty"` +} + +// ToRecordSetCreateMap formats an CreateOpts structure into a request body. +func (opts CreateOpts) ToRecordSetCreateMap() (map[string]interface{}, error) { + b, err := gophercloud.BuildRequestBody(opts, "") + if err != nil { + return nil, err + } + + return b, nil +} + +// Create creates a recordset in a given zone. +func Create(client *gophercloud.ServiceClient, zoneID string, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToRecordSetCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Post(baseURL(client, zoneID), &b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{201, 202}, + }) + return +} + +// UpdateOptsBuilder allows extensions to add additional attributes to the +// Update request. +type UpdateOptsBuilder interface { + ToRecordSetUpdateMap() (map[string]interface{}, error) +} + +// UpdateOpts specifies the base attributes that may be updated on an existing +// RecordSet. +type UpdateOpts struct { + // Description is a description of the RecordSet. + Description string `json:"description,omitempty"` + + // TTL is the time to live of the RecordSet. + TTL int `json:"ttl,omitempty"` + + // Records are the DNS records of the RecordSet. + Records []string `json:"records,omitempty"` +} + +// ToRecordSetUpdateMap formats an UpdateOpts structure into a request body. +func (opts UpdateOpts) ToRecordSetUpdateMap() (map[string]interface{}, error) { + b, err := gophercloud.BuildRequestBody(opts, "") + if err != nil { + return nil, err + } + + if opts.TTL > 0 { + b["ttl"] = opts.TTL + } else { + b["ttl"] = nil + } + + return b, nil +} + +// Update updates a recordset in a given zone +func Update(client *gophercloud.ServiceClient, zoneID string, rrsetID string, opts UpdateOptsBuilder) (r UpdateResult) { + b, err := opts.ToRecordSetUpdateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Put(rrsetURL(client, zoneID, rrsetID), &b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 202}, + }) + return +} + +// Delete removes an existing RecordSet. +func Delete(client *gophercloud.ServiceClient, zoneID string, rrsetID string) (r DeleteResult) { + _, r.Err = client.Delete(rrsetURL(client, zoneID, rrsetID), &gophercloud.RequestOpts{ + OkCodes: []int{202}, + }) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/results.go new file mode 100644 index 0000000000..0fdc1fe52e --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/results.go @@ -0,0 +1,147 @@ +package recordsets + +import ( + "encoding/json" + "time" + + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +type commonResult struct { + gophercloud.Result +} + +// Extract interprets a GetResult, CreateResult or UpdateResult as a RecordSet. +// An error is returned if the original call or the extraction failed. +func (r commonResult) Extract() (*RecordSet, error) { + var s *RecordSet + err := r.ExtractInto(&s) + return s, err +} + +// CreateResult is the result of a Create operation. Call its Extract method to +// interpret the result as a RecordSet. +type CreateResult struct { + commonResult +} + +// GetResult is the result of a Get operation. Call its Extract method to +// interpret the result as a RecordSet. +type GetResult struct { + commonResult +} + +// RecordSetPage is a single page of RecordSet results. +type RecordSetPage struct { + pagination.LinkedPageBase +} + +// UpdateResult is result of an Update operation. Call its Extract method to +// interpret the result as a RecordSet. +type UpdateResult struct { + commonResult +} + +// DeleteResult is result of a Delete operation. Call its ExtractErr method to +// determine if the operation succeeded or failed. +type DeleteResult struct { + gophercloud.ErrResult +} + +// IsEmpty returns true if the page contains no results. +func (r RecordSetPage) IsEmpty() (bool, error) { + s, err := ExtractRecordSets(r) + return len(s) == 0, err +} + +// ExtractRecordSets extracts a slice of RecordSets from a List result. +func ExtractRecordSets(r pagination.Page) ([]RecordSet, error) { + var s struct { + RecordSets []RecordSet `json:"recordsets"` + } + err := (r.(RecordSetPage)).ExtractInto(&s) + return s.RecordSets, err +} + +// RecordSet represents a DNS Record Set. +type RecordSet struct { + // ID is the unique ID of the recordset + ID string `json:"id"` + + // ZoneID is the ID of the zone the recordset belongs to. + ZoneID string `json:"zone_id"` + + // ProjectID is the ID of the project that owns the recordset. + ProjectID string `json:"project_id"` + + // Name is the name of the recordset. + Name string `json:"name"` + + // ZoneName is the name of the zone the recordset belongs to. + ZoneName string `json:"zone_name"` + + // Type is the RRTYPE of the recordset. + Type string `json:"type"` + + // Records are the DNS records of the recordset. + Records []string `json:"records"` + + // TTL is the time to live of the recordset. + TTL int `json:"ttl"` + + // Status is the status of the recordset. + Status string `json:"status"` + + // Action is the current action in progress of the recordset. + Action string `json:"action"` + + // Description is the description of the recordset. + Description string `json:"description"` + + // Version is the revision of the recordset. + Version int `json:"version"` + + // CreatedAt is the date when the recordset was created. + CreatedAt time.Time `json:"-"` + + // UpdatedAt is the date when the recordset was updated. + UpdatedAt time.Time `json:"-"` + + // Links includes HTTP references to the itself, + // useful for passing along to other APIs that might want a recordset + // reference. + Links []gophercloud.Link `json:"-"` +} + +func (r *RecordSet) UnmarshalJSON(b []byte) error { + type tmp RecordSet + var s struct { + tmp + CreatedAt gophercloud.JSONRFC3339MilliNoZ `json:"created_at"` + UpdatedAt gophercloud.JSONRFC3339MilliNoZ `json:"updated_at"` + Links map[string]interface{} `json:"links"` + } + err := json.Unmarshal(b, &s) + if err != nil { + return err + } + *r = RecordSet(s.tmp) + + r.CreatedAt = time.Time(s.CreatedAt) + r.UpdatedAt = time.Time(s.UpdatedAt) + + if s.Links != nil { + for rel, href := range s.Links { + if v, ok := href.(string); ok { + link := gophercloud.Link{ + Rel: rel, + Href: v, + } + r.Links = append(r.Links, link) + } + } + } + + return err +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/urls.go new file mode 100644 index 0000000000..5ec18d1bb7 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets/urls.go @@ -0,0 +1,11 @@ +package recordsets + +import "github.com/gophercloud/gophercloud" + +func baseURL(c *gophercloud.ServiceClient, zoneID string) string { + return c.ServiceURL("zones", zoneID, "recordsets") +} + +func rrsetURL(c *gophercloud.ServiceClient, zoneID string, rrsetID string) string { + return c.ServiceURL("zones", zoneID, "recordsets", rrsetID) +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/BUILD.bazel index 52935648b1..a0bd970a1d 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones", importpath = "github.com/gophercloud/gophercloud/openstack/dns/v2/zones", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/doc.go new file mode 100644 index 0000000000..7733155bcf --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/doc.go @@ -0,0 +1,48 @@ +/* +Package zones provides information and interaction with the zone API +resource for the OpenStack DNS service. + +Example to List Zones + + listOpts := zones.ListOpts{ + Email: "jdoe@example.com", + } + + allPages, err := zones.List(dnsClient, listOpts).AllPages() + if err != nil { + panic(err) + } + + allZones, err := zones.ExtractZones(allPages) + if err != nil { + panic(err) + } + + for _, zone := range allZones { + fmt.Printf("%+v\n", zone) + } + +Example to Create a Zone + + createOpts := zones.CreateOpts{ + Name: "example.com.", + Email: "jdoe@example.com", + Type: "PRIMARY", + TTL: 7200, + Description: "This is a zone.", + } + + zone, err := zones.Create(dnsClient, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a Zone + + zoneID := "99d10f68-5623-4491-91a0-6daafa32b60e" + err := zones.Delete(dnsClient, zoneID).ExtractErr() + if err != nil { + panic(err) + } +*/ +package zones diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/requests.go new file mode 100644 index 0000000000..f87deadce7 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/requests.go @@ -0,0 +1,174 @@ +package zones + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +// ListOptsBuilder allows extensions to add parameters to the List request. +type ListOptsBuilder interface { + ToZoneListQuery() (string, error) +} + +// ListOpts allows the filtering and sorting of paginated collections through +// the API. Filtering is achieved by passing in struct field values that map to +// the server attributes you want to see returned. Marker and Limit are used +// for pagination. +// https://developer.openstack.org/api-ref/dns/ +type ListOpts struct { + // Integer value for the limit of values to return. + Limit int `q:"limit"` + + // UUID of the zone at which you want to set a marker. + Marker string `q:"marker"` + + Description string `q:"description"` + Email string `q:"email"` + Name string `q:"name"` + SortDir string `q:"sort_dir"` + SortKey string `q:"sort_key"` + Status string `q:"status"` + TTL int `q:"ttl"` + Type string `q:"type"` +} + +// ToZoneListQuery formats a ListOpts into a query string. +func (opts ListOpts) ToZoneListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// List implements a zone List request. +func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager { + url := baseURL(client) + if opts != nil { + query, err := opts.ToZoneListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page { + return ZonePage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +// Get returns information about a zone, given its ID. +func Get(client *gophercloud.ServiceClient, zoneID string) (r GetResult) { + _, r.Err = client.Get(zoneURL(client, zoneID), &r.Body, nil) + return +} + +// CreateOptsBuilder allows extensions to add additional attributes to the +// Create request. +type CreateOptsBuilder interface { + ToZoneCreateMap() (map[string]interface{}, error) +} + +// CreateOpts specifies the attributes used to create a zone. +type CreateOpts struct { + // Attributes are settings that supply hints and filters for the zone. + Attributes map[string]string `json:"attributes,omitempty"` + + // Email contact of the zone. + Email string `json:"email,omitempty"` + + // Description of the zone. + Description string `json:"description,omitempty"` + + // Name of the zone. + Name string `json:"name" required:"true"` + + // Masters specifies zone masters if this is a secondary zone. + Masters []string `json:"masters,omitempty"` + + // TTL is the time to live of the zone. + TTL int `json:"-"` + + // Type specifies if this is a primary or secondary zone. + Type string `json:"type,omitempty"` +} + +// ToZoneCreateMap formats an CreateOpts structure into a request body. +func (opts CreateOpts) ToZoneCreateMap() (map[string]interface{}, error) { + b, err := gophercloud.BuildRequestBody(opts, "") + if err != nil { + return nil, err + } + + if opts.TTL > 0 { + b["ttl"] = opts.TTL + } + + return b, nil +} + +// Create implements a zone create request. +func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToZoneCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Post(baseURL(client), &b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{201, 202}, + }) + return +} + +// UpdateOptsBuilder allows extensions to add additional attributes to the +// Update request. +type UpdateOptsBuilder interface { + ToZoneUpdateMap() (map[string]interface{}, error) +} + +// UpdateOpts specifies the attributes to update a zone. +type UpdateOpts struct { + // Email contact of the zone. + Email string `json:"email,omitempty"` + + // TTL is the time to live of the zone. + TTL int `json:"-"` + + // Masters specifies zone masters if this is a secondary zone. + Masters []string `json:"masters,omitempty"` + + // Description of the zone. + Description string `json:"description,omitempty"` +} + +// ToZoneUpdateMap formats an UpdateOpts structure into a request body. +func (opts UpdateOpts) ToZoneUpdateMap() (map[string]interface{}, error) { + b, err := gophercloud.BuildRequestBody(opts, "") + if err != nil { + return nil, err + } + + if opts.TTL > 0 { + b["ttl"] = opts.TTL + } + + return b, nil +} + +// Update implements a zone update request. +func Update(client *gophercloud.ServiceClient, zoneID string, opts UpdateOptsBuilder) (r UpdateResult) { + b, err := opts.ToZoneUpdateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = client.Patch(zoneURL(client, zoneID), &b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 202}, + }) + return +} + +// Delete implements a zone delete request. +func Delete(client *gophercloud.ServiceClient, zoneID string) (r DeleteResult) { + _, r.Err = client.Delete(zoneURL(client, zoneID), &gophercloud.RequestOpts{ + OkCodes: []int{202}, + JSONResponse: &r.Body, + }) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/results.go new file mode 100644 index 0000000000..a36eca7e20 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/results.go @@ -0,0 +1,166 @@ +package zones + +import ( + "encoding/json" + "strconv" + "time" + + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +type commonResult struct { + gophercloud.Result +} + +// Extract interprets a GetResult, CreateResult or UpdateResult as a Zone. +// An error is returned if the original call or the extraction failed. +func (r commonResult) Extract() (*Zone, error) { + var s *Zone + err := r.ExtractInto(&s) + return s, err +} + +// CreateResult is the result of a Create request. Call its Extract method +// to interpret the result as a Zone. +type CreateResult struct { + commonResult +} + +// GetResult is the result of a Get request. Call its Extract method +// to interpret the result as a Zone. +type GetResult struct { + commonResult +} + +// UpdateResult is the result of an Update request. Call its Extract method +// to interpret the result as a Zone. +type UpdateResult struct { + commonResult +} + +// DeleteResult is the result of a Delete request. Call its ExtractErr method +// to determine if the request succeeded or failed. +type DeleteResult struct { + commonResult +} + +// ZonePage is a single page of Zone results. +type ZonePage struct { + pagination.LinkedPageBase +} + +// IsEmpty returns true if the page contains no results. +func (r ZonePage) IsEmpty() (bool, error) { + s, err := ExtractZones(r) + return len(s) == 0, err +} + +// ExtractZones extracts a slice of Zones from a List result. +func ExtractZones(r pagination.Page) ([]Zone, error) { + var s struct { + Zones []Zone `json:"zones"` + } + err := (r.(ZonePage)).ExtractInto(&s) + return s.Zones, err +} + +// Zone represents a DNS zone. +type Zone struct { + // ID uniquely identifies this zone amongst all other zones, including those + // not accessible to the current tenant. + ID string `json:"id"` + + // PoolID is the ID for the pool hosting this zone. + PoolID string `json:"pool_id"` + + // ProjectID identifies the project/tenant owning this resource. + ProjectID string `json:"project_id"` + + // Name is the DNS Name for the zone. + Name string `json:"name"` + + // Email for the zone. Used in SOA records for the zone. + Email string `json:"email"` + + // Description for this zone. + Description string `json:"description"` + + // TTL is the Time to Live for the zone. + TTL int `json:"ttl"` + + // Serial is the current serial number for the zone. + Serial int `json:"-"` + + // Status is the status of the resource. + Status string `json:"status"` + + // Action is the current action in progress on the resource. + Action string `json:"action"` + + // Version of the resource. + Version int `json:"version"` + + // Attributes for the zone. + Attributes map[string]string `json:"attributes"` + + // Type of zone. Primary is controlled by Designate. + // Secondary zones are slaved from another DNS Server. + // Defaults to Primary. + Type string `json:"type"` + + // Masters is the servers for slave servers to get DNS information from. + Masters []string `json:"masters"` + + // CreatedAt is the date when the zone was created. + CreatedAt time.Time `json:"-"` + + // UpdatedAt is the date when the last change was made to the zone. + UpdatedAt time.Time `json:"-"` + + // TransferredAt is the last time an update was retrieved from the + // master servers. + TransferredAt time.Time `json:"-"` + + // Links includes HTTP references to the itself, useful for passing along + // to other APIs that might want a server reference. + Links map[string]interface{} `json:"links"` +} + +func (r *Zone) UnmarshalJSON(b []byte) error { + type tmp Zone + var s struct { + tmp + CreatedAt gophercloud.JSONRFC3339MilliNoZ `json:"created_at"` + UpdatedAt gophercloud.JSONRFC3339MilliNoZ `json:"updated_at"` + TransferredAt gophercloud.JSONRFC3339MilliNoZ `json:"transferred_at"` + Serial interface{} `json:"serial"` + } + err := json.Unmarshal(b, &s) + if err != nil { + return err + } + *r = Zone(s.tmp) + + r.CreatedAt = time.Time(s.CreatedAt) + r.UpdatedAt = time.Time(s.UpdatedAt) + r.TransferredAt = time.Time(s.TransferredAt) + + switch t := s.Serial.(type) { + case float64: + r.Serial = int(t) + case string: + switch t { + case "": + r.Serial = 0 + default: + serial, err := strconv.ParseFloat(t, 64) + if err != nil { + return err + } + r.Serial = int(serial) + } + } + + return err +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/urls.go new file mode 100644 index 0000000000..9bef705809 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/dns/v2/zones/urls.go @@ -0,0 +1,11 @@ +package zones + +import "github.com/gophercloud/gophercloud" + +func baseURL(c *gophercloud.ServiceClient) string { + return c.ServiceURL("zones") +} + +func zoneURL(c *gophercloud.ServiceClient, zoneID string) string { + return c.ServiceURL("zones", zoneID) +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/BUILD.bazel index 21085a89b1..61a779f215 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners", importpath = "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/doc.go new file mode 100644 index 0000000000..4ccb967755 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/doc.go @@ -0,0 +1,71 @@ +/* +Package listeners provides information and interaction with Listeners of the +LBaaS v2 extension for the OpenStack Networking service. + +Example to List Listeners + + listOpts := listeners.ListOpts{ + LoadbalancerID : "ca430f80-1737-4712-8dc6-3f640d55594b", + } + + allPages, err := listeners.List(networkClient, listOpts).AllPages() + if err != nil { + panic(err) + } + + allListeners, err := listeners.ExtractListeners(allPages) + if err != nil { + panic(err) + } + + for _, listener := range allListeners { + fmt.Printf("%+v\n", listener) + } + +Example to Create a Listener + + createOpts := listeners.CreateOpts{ + Protocol: "TCP", + Name: "db", + LoadbalancerID: "79e05663-7f03-45d2-a092-8b94062f22ab", + AdminStateUp: gophercloud.Enabled, + DefaultPoolID: "41efe233-7591-43c5-9cf7-923964759f9e", + ProtocolPort: 3306, + } + + listener, err := listeners.Create(networkClient, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Update a Listener + + listenerID := "d67d56a6-4a86-4688-a282-f46444705c64" + + i1001 := 1001 + updateOpts := listeners.UpdateOpts{ + ConnLimit: &i1001, + } + + listener, err := listeners.Update(networkClient, listenerID, updateOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a Listener + + listenerID := "d67d56a6-4a86-4688-a282-f46444705c64" + err := listeners.Delete(networkClient, listenerID).ExtractErr() + if err != nil { + panic(err) + } + +Example to Get the Statistics of a Listener + + listenerID := "d67d56a6-4a86-4688-a282-f46444705c64" + stats, err := listeners.GetStats(networkClient, listenerID).Extract() + if err != nil { + panic(err) + } +*/ +package listeners diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go new file mode 100644 index 0000000000..ac587e258d --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/requests.go @@ -0,0 +1,200 @@ +package listeners + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +// Type Protocol represents a listener protocol. +type Protocol string + +// Supported attributes for create/update operations. +const ( + ProtocolTCP Protocol = "TCP" + ProtocolHTTP Protocol = "HTTP" + ProtocolHTTPS Protocol = "HTTPS" +) + +// ListOptsBuilder allows extensions to add additional parameters to the +// List request. +type ListOptsBuilder interface { + ToListenerListQuery() (string, error) +} + +// ListOpts allows the filtering and sorting of paginated collections through +// the API. Filtering is achieved by passing in struct field values that map to +// the floating IP attributes you want to see returned. SortKey allows you to +// sort by a particular listener attribute. SortDir sets the direction, and is +// either `asc' or `desc'. Marker and Limit are used for pagination. +type ListOpts struct { + ID string `q:"id"` + Name string `q:"name"` + AdminStateUp *bool `q:"admin_state_up"` + ProjectID string `q:"project_id"` + LoadbalancerID string `q:"loadbalancer_id"` + DefaultPoolID string `q:"default_pool_id"` + Protocol string `q:"protocol"` + ProtocolPort int `q:"protocol_port"` + ConnectionLimit int `q:"connection_limit"` + Limit int `q:"limit"` + Marker string `q:"marker"` + SortKey string `q:"sort_key"` + SortDir string `q:"sort_dir"` +} + +// ToListenerListQuery formats a ListOpts into a query string. +func (opts ListOpts) ToListenerListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// List returns a Pager which allows you to iterate over a collection of +// listeners. It accepts a ListOpts struct, which allows you to filter and sort +// the returned collection for greater efficiency. +// +// Default policy settings return only those listeners that are owned by the +// project who submits the request, unless an admin user submits the request. +func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager { + url := rootURL(c) + if opts != nil { + query, err := opts.ToListenerListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(c, url, func(r pagination.PageResult) pagination.Page { + return ListenerPage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +// CreateOptsBuilder allows extensions to add additional parameters to the +// Create request. +type CreateOptsBuilder interface { + ToListenerCreateMap() (map[string]interface{}, error) +} + +// CreateOpts represents options for creating a listener. +type CreateOpts struct { + // The load balancer on which to provision this listener. + LoadbalancerID string `json:"loadbalancer_id" required:"true"` + + // The protocol - can either be TCP, HTTP or HTTPS. + Protocol Protocol `json:"protocol" required:"true"` + + // The port on which to listen for client traffic. + ProtocolPort int `json:"protocol_port" required:"true"` + + // ProjectID is only required if the caller has an admin role and wants + // to create a pool for another project. + ProjectID string `json:"project_id,omitempty"` + + // Human-readable name for the Listener. Does not have to be unique. + Name string `json:"name,omitempty"` + + // The ID of the default pool with which the Listener is associated. + DefaultPoolID string `json:"default_pool_id,omitempty"` + + // Human-readable description for the Listener. + Description string `json:"description,omitempty"` + + // The maximum number of connections allowed for the Listener. + ConnLimit *int `json:"connection_limit,omitempty"` + + // A reference to a Barbican container of TLS secrets. + DefaultTlsContainerRef string `json:"default_tls_container_ref,omitempty"` + + // A list of references to TLS secrets. + SniContainerRefs []string `json:"sni_container_refs,omitempty"` + + // The administrative state of the Listener. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToListenerCreateMap builds a request body from CreateOpts. +func (opts CreateOpts) ToListenerCreateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "listener") +} + +// Create is an operation which provisions a new Listeners based on the +// configuration defined in the CreateOpts struct. Once the request is +// validated and progress has started on the provisioning process, a +// CreateResult will be returned. +// +// Users with an admin role can create Listeners on behalf of other projects by +// specifying a ProjectID attribute different than their own. +func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToListenerCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Post(rootURL(c), b, &r.Body, nil) + return +} + +// Get retrieves a particular Listeners based on its unique ID. +func Get(c *gophercloud.ServiceClient, id string) (r GetResult) { + _, r.Err = c.Get(resourceURL(c, id), &r.Body, nil) + return +} + +// UpdateOptsBuilder allows extensions to add additional parameters to the +// Update request. +type UpdateOptsBuilder interface { + ToListenerUpdateMap() (map[string]interface{}, error) +} + +// UpdateOpts represents options for updating a Listener. +type UpdateOpts struct { + // Human-readable name for the Listener. Does not have to be unique. + Name string `json:"name,omitempty"` + + // Human-readable description for the Listener. + Description string `json:"description,omitempty"` + + // The maximum number of connections allowed for the Listener. + ConnLimit *int `json:"connection_limit,omitempty"` + + // A reference to a Barbican container of TLS secrets. + DefaultTlsContainerRef string `json:"default_tls_container_ref,omitempty"` + + // A list of references to TLS secrets. + SniContainerRefs []string `json:"sni_container_refs,omitempty"` + + // The administrative state of the Listener. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToListenerUpdateMap builds a request body from UpdateOpts. +func (opts UpdateOpts) ToListenerUpdateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "listener") +} + +// Update is an operation which modifies the attributes of the specified +// Listener. +func Update(c *gophercloud.ServiceClient, id string, opts UpdateOpts) (r UpdateResult) { + b, err := opts.ToListenerUpdateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Put(resourceURL(c, id), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 202}, + }) + return +} + +// Delete will permanently delete a particular Listeners based on its unique ID. +func Delete(c *gophercloud.ServiceClient, id string) (r DeleteResult) { + _, r.Err = c.Delete(resourceURL(c, id), nil) + return +} + +// GetStats will return the shows the current statistics of a particular Listeners. +func GetStats(c *gophercloud.ServiceClient, id string) (r StatsResult) { + _, r.Err = c.Get(statisticsRootURL(c, id), &r.Body, nil) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go new file mode 100644 index 0000000000..c3e7129157 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/results.go @@ -0,0 +1,168 @@ +package listeners + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools" + "github.com/gophercloud/gophercloud/pagination" +) + +type LoadBalancerID struct { + ID string `json:"id"` +} + +// Listener is the primary load balancing configuration object that specifies +// the loadbalancer and port on which client traffic is received, as well +// as other details such as the load balancing method to be use, protocol, etc. +type Listener struct { + // The unique ID for the Listener. + ID string `json:"id"` + + // Owner of the Listener. + ProjectID string `json:"project_id"` + + // Human-readable name for the Listener. Does not have to be unique. + Name string `json:"name"` + + // Human-readable description for the Listener. + Description string `json:"description"` + + // The protocol to loadbalance. A valid value is TCP, HTTP, or HTTPS. + Protocol string `json:"protocol"` + + // The port on which to listen to client traffic that is associated with the + // Loadbalancer. A valid value is from 0 to 65535. + ProtocolPort int `json:"protocol_port"` + + // The UUID of default pool. Must have compatible protocol with listener. + DefaultPoolID string `json:"default_pool_id"` + + // A list of load balancer IDs. + Loadbalancers []LoadBalancerID `json:"loadbalancers"` + + // The maximum number of connections allowed for the Loadbalancer. + // Default is -1, meaning no limit. + ConnLimit int `json:"connection_limit"` + + // The list of references to TLS secrets. + SniContainerRefs []string `json:"sni_container_refs"` + + // A reference to a Barbican container of TLS secrets. + DefaultTlsContainerRef string `json:"default_tls_container_ref"` + + // The administrative state of the Listener. A valid value is true (UP) or false (DOWN). + AdminStateUp bool `json:"admin_state_up"` + + // Pools are the pools which are part of this listener. + Pools []pools.Pool `json:"pools"` + + // The provisioning status of the Listener. + // This value is ACTIVE, PENDING_* or ERROR. + ProvisioningStatus string `json:"provisioning_status"` +} + +type Stats struct { + // The currently active connections. + ActiveConnections int `json:"active_connections"` + + // The total bytes received. + BytesIn int `json:"bytes_in"` + + // The total bytes sent. + BytesOut int `json:"bytes_out"` + + // The total requests that were unable to be fulfilled. + RequestErrors int `json:"request_errors"` + + // The total connections handled. + TotalConnections int `json:"total_connections"` +} + +// ListenerPage is the page returned by a pager when traversing over a +// collection of listeners. +type ListenerPage struct { + pagination.LinkedPageBase +} + +// NextPageURL is invoked when a paginated collection of listeners has reached +// the end of a page and the pager seeks to traverse over a new one. In order +// to do this, it needs to construct the next page's URL. +func (r ListenerPage) NextPageURL() (string, error) { + var s struct { + Links []gophercloud.Link `json:"listeners_links"` + } + err := r.ExtractInto(&s) + if err != nil { + return "", err + } + return gophercloud.ExtractNextURL(s.Links) +} + +// IsEmpty checks whether a ListenerPage struct is empty. +func (r ListenerPage) IsEmpty() (bool, error) { + is, err := ExtractListeners(r) + return len(is) == 0, err +} + +// ExtractListeners accepts a Page struct, specifically a ListenerPage struct, +// and extracts the elements into a slice of Listener structs. In other words, +// a generic collection is mapped into a relevant slice. +func ExtractListeners(r pagination.Page) ([]Listener, error) { + var s struct { + Listeners []Listener `json:"listeners"` + } + err := (r.(ListenerPage)).ExtractInto(&s) + return s.Listeners, err +} + +type commonResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts a listener. +func (r commonResult) Extract() (*Listener, error) { + var s struct { + Listener *Listener `json:"listener"` + } + err := r.ExtractInto(&s) + return s.Listener, err +} + +// CreateResult represents the result of a create operation. Call its Extract +// method to interpret it as a Listener. +type CreateResult struct { + commonResult +} + +// GetResult represents the result of a get operation. Call its Extract +// method to interpret it as a Listener. +type GetResult struct { + commonResult +} + +// UpdateResult represents the result of an update operation. Call its Extract +// method to interpret it as a Listener. +type UpdateResult struct { + commonResult +} + +// DeleteResult represents the result of a delete operation. Call its +// ExtractErr method to determine if the request succeeded or failed. +type DeleteResult struct { + gophercloud.ErrResult +} + +// StatsResult represents the result of a GetStats operation. +// Call its Extract method to interpret it as a Stats. +type StatsResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts the status of +// a Listener. +func (r StatsResult) Extract() (*Stats, error) { + var s struct { + Stats *Stats `json:"stats"` + } + err := r.ExtractInto(&s) + return s.Stats, err +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/urls.go new file mode 100644 index 0000000000..e9e3bccd3e --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners/urls.go @@ -0,0 +1,21 @@ +package listeners + +import "github.com/gophercloud/gophercloud" + +const ( + rootPath = "lbaas" + resourcePath = "listeners" + statisticsPath = "stats" +) + +func rootURL(c *gophercloud.ServiceClient) string { + return c.ServiceURL(rootPath, resourcePath) +} + +func resourceURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id) +} + +func statisticsRootURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id, statisticsPath) +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/BUILD.bazel index c8349acd6d..f76aa538ff 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers", importpath = "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go new file mode 100644 index 0000000000..244e19882a --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/doc.go @@ -0,0 +1,84 @@ +/* +Package loadbalancers provides information and interaction with Load Balancers +of the LBaaS v2 extension for the OpenStack Networking service. + +Example to List Load Balancers + + listOpts := loadbalancers.ListOpts{ + Provider: "haproxy", + } + + allPages, err := loadbalancers.List(networkClient, listOpts).AllPages() + if err != nil { + panic(err) + } + + allLoadbalancers, err := loadbalancers.ExtractLoadBalancers(allPages) + if err != nil { + panic(err) + } + + for _, lb := range allLoadbalancers { + fmt.Printf("%+v\n", lb) + } + +Example to Create a Load Balancer + + createOpts := loadbalancers.CreateOpts{ + Name: "db_lb", + AdminStateUp: gophercloud.Enabled, + VipSubnetID: "9cedb85d-0759-4898-8a4b-fa5a5ea10086", + VipAddress: "10.30.176.48", + Flavor: "medium", + Provider: "haproxy", + } + + lb, err := loadbalancers.Create(networkClient, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Update a Load Balancer + + lbID := "d67d56a6-4a86-4688-a282-f46444705c64" + + i1001 := 1001 + updateOpts := loadbalancers.UpdateOpts{ + Name: "new-name", + } + + lb, err := loadbalancers.Update(networkClient, lbID, updateOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a Load Balancers + + deleteOpts := loadbalancers.DeleteOpts{ + Cascade: true, + } + + lbID := "d67d56a6-4a86-4688-a282-f46444705c64" + + err := loadbalancers.Delete(networkClient, lbID, deleteOpts).ExtractErr() + if err != nil { + panic(err) + } + +Example to Get the Status of a Load Balancer + + lbID := "d67d56a6-4a86-4688-a282-f46444705c64" + status, err := loadbalancers.GetStatuses(networkClient, LBID).Extract() + if err != nil { + panic(err) + } + +Example to Get the Statistics of a Load Balancer + + lbID := "d67d56a6-4a86-4688-a282-f46444705c64" + stats, err := loadbalancers.GetStats(networkClient, LBID).Extract() + if err != nil { + panic(err) + } +*/ +package loadbalancers diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go new file mode 100644 index 0000000000..99b60fb458 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/requests.go @@ -0,0 +1,211 @@ +package loadbalancers + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +// ListOptsBuilder allows extensions to add additional parameters to the +// List request. +type ListOptsBuilder interface { + ToLoadBalancerListQuery() (string, error) +} + +// ListOpts allows the filtering and sorting of paginated collections through +// the API. Filtering is achieved by passing in struct field values that map to +// the Loadbalancer attributes you want to see returned. SortKey allows you to +// sort by a particular attribute. SortDir sets the direction, and is +// either `asc' or `desc'. Marker and Limit are used for pagination. +type ListOpts struct { + Description string `q:"description"` + AdminStateUp *bool `q:"admin_state_up"` + ProjectID string `q:"project_id"` + ProvisioningStatus string `q:"provisioning_status"` + VipAddress string `q:"vip_address"` + VipPortID string `q:"vip_port_id"` + VipSubnetID string `q:"vip_subnet_id"` + ID string `q:"id"` + OperatingStatus string `q:"operating_status"` + Name string `q:"name"` + Flavor string `q:"flavor"` + Provider string `q:"provider"` + Limit int `q:"limit"` + Marker string `q:"marker"` + SortKey string `q:"sort_key"` + SortDir string `q:"sort_dir"` +} + +// ToLoadBalancerListQuery formats a ListOpts into a query string. +func (opts ListOpts) ToLoadBalancerListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// List returns a Pager which allows you to iterate over a collection of +// load balancers. It accepts a ListOpts struct, which allows you to filter +// and sort the returned collection for greater efficiency. +// +// Default policy settings return only those load balancers that are owned by +// the project who submits the request, unless an admin user submits the request. +func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager { + url := rootURL(c) + if opts != nil { + query, err := opts.ToLoadBalancerListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(c, url, func(r pagination.PageResult) pagination.Page { + return LoadBalancerPage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +// CreateOptsBuilder allows extensions to add additional parameters to the +// Create request. +type CreateOptsBuilder interface { + ToLoadBalancerCreateMap() (map[string]interface{}, error) +} + +// CreateOpts is the common options struct used in this package's Create +// operation. +type CreateOpts struct { + // Human-readable name for the Loadbalancer. Does not have to be unique. + Name string `json:"name,omitempty"` + + // Human-readable description for the Loadbalancer. + Description string `json:"description,omitempty"` + + // The network on which to allocate the Loadbalancer's address. A project can + // only create Loadbalancers on networks authorized by policy (e.g. networks + // that belong to them or networks that are shared). + VipSubnetID string `json:"vip_subnet_id" required:"true"` + + // ProjectID is the UUID of the project who owns the Loadbalancer. + // Only administrative users can specify a project UUID other than their own. + ProjectID string `json:"project_id,omitempty"` + + // The IP address of the Loadbalancer. + VipAddress string `json:"vip_address,omitempty"` + + // The administrative state of the Loadbalancer. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` + + // The UUID of a flavor. + Flavor string `json:"flavor,omitempty"` + + // The name of the provider. + Provider string `json:"provider,omitempty"` +} + +// ToLoadBalancerCreateMap builds a request body from CreateOpts. +func (opts CreateOpts) ToLoadBalancerCreateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "loadbalancer") +} + +// Create is an operation which provisions a new loadbalancer based on the +// configuration defined in the CreateOpts struct. Once the request is +// validated and progress has started on the provisioning process, a +// CreateResult will be returned. +func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToLoadBalancerCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Post(rootURL(c), b, &r.Body, nil) + return +} + +// Get retrieves a particular Loadbalancer based on its unique ID. +func Get(c *gophercloud.ServiceClient, id string) (r GetResult) { + _, r.Err = c.Get(resourceURL(c, id), &r.Body, nil) + return +} + +// UpdateOptsBuilder allows extensions to add additional parameters to the +// Update request. +type UpdateOptsBuilder interface { + ToLoadBalancerUpdateMap() (map[string]interface{}, error) +} + +// UpdateOpts is the common options struct used in this package's Update +// operation. +type UpdateOpts struct { + // Human-readable name for the Loadbalancer. Does not have to be unique. + Name string `json:"name,omitempty"` + + // Human-readable description for the Loadbalancer. + Description string `json:"description,omitempty"` + + // The administrative state of the Loadbalancer. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToLoadBalancerUpdateMap builds a request body from UpdateOpts. +func (opts UpdateOpts) ToLoadBalancerUpdateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "loadbalancer") +} + +// Update is an operation which modifies the attributes of the specified +// LoadBalancer. +func Update(c *gophercloud.ServiceClient, id string, opts UpdateOpts) (r UpdateResult) { + b, err := opts.ToLoadBalancerUpdateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Put(resourceURL(c, id), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 202}, + }) + return +} + +// DeleteOptsBuilder allows extensions to add additional parameters to the +// Delete request. +type DeleteOptsBuilder interface { + ToLoadBalancerDeleteQuery() (string, error) +} + +// DeleteOpts is the common options struct used in this package's Delete +// operation. +type DeleteOpts struct { + // Cascade will delete all children of the load balancer (listners, monitors, etc). + Cascade bool `q:"cascade"` +} + +// ToLoadBalancerDeleteQuery formats a DeleteOpts into a query string. +func (opts DeleteOpts) ToLoadBalancerDeleteQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// Delete will permanently delete a particular LoadBalancer based on its +// unique ID. +func Delete(c *gophercloud.ServiceClient, id string, opts DeleteOptsBuilder) (r DeleteResult) { + url := resourceURL(c, id) + if opts != nil { + query, err := opts.ToLoadBalancerDeleteQuery() + if err != nil { + r.Err = err + return + } + url += query + } + _, r.Err = c.Delete(url, nil) + return +} + +// GetStatuses will return the status of a particular LoadBalancer. +func GetStatuses(c *gophercloud.ServiceClient, id string) (r GetStatusesResult) { + _, r.Err = c.Get(statusRootURL(c, id), &r.Body, nil) + return +} + +// GetStats will return the shows the current statistics of a particular LoadBalancer. +func GetStats(c *gophercloud.ServiceClient, id string) (r StatsResult) { + _, r.Err = c.Get(statisticsRootURL(c, id), &r.Body, nil) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go new file mode 100644 index 0000000000..69e8a8b701 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/results.go @@ -0,0 +1,182 @@ +package loadbalancers + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/listeners" + "github.com/gophercloud/gophercloud/pagination" +) + +// LoadBalancer is the primary load balancing configuration object that +// specifies the virtual IP address on which client traffic is received, as well +// as other details such as the load balancing method to be use, protocol, etc. +type LoadBalancer struct { + // Human-readable description for the Loadbalancer. + Description string `json:"description"` + + // The administrative state of the Loadbalancer. + // A valid value is true (UP) or false (DOWN). + AdminStateUp bool `json:"admin_state_up"` + + // Owner of the LoadBalancer. + ProjectID string `json:"project_id"` + + // The provisioning status of the LoadBalancer. + // This value is ACTIVE, PENDING_CREATE or ERROR. + ProvisioningStatus string `json:"provisioning_status"` + + // The IP address of the Loadbalancer. + VipAddress string `json:"vip_address"` + + // The UUID of the port associated with the IP address. + VipPortID string `json:"vip_port_id"` + + // The UUID of the subnet on which to allocate the virtual IP for the + // Loadbalancer address. + VipSubnetID string `json:"vip_subnet_id"` + + // The unique ID for the LoadBalancer. + ID string `json:"id"` + + // The operating status of the LoadBalancer. This value is ONLINE or OFFLINE. + OperatingStatus string `json:"operating_status"` + + // Human-readable name for the LoadBalancer. Does not have to be unique. + Name string `json:"name"` + + // The UUID of a flavor if set. + Flavor string `json:"flavor"` + + // The name of the provider. + Provider string `json:"provider"` + + // Listeners are the listeners related to this Loadbalancer. + Listeners []listeners.Listener `json:"listeners"` +} + +// StatusTree represents the status of a loadbalancer. +type StatusTree struct { + Loadbalancer *LoadBalancer `json:"loadbalancer"` +} + +type Stats struct { + // The currently active connections. + ActiveConnections int `json:"active_connections"` + + // The total bytes received. + BytesIn int `json:"bytes_in"` + + // The total bytes sent. + BytesOut int `json:"bytes_out"` + + // The total requests that were unable to be fulfilled. + RequestErrors int `json:"request_errors"` + + // The total connections handled. + TotalConnections int `json:"total_connections"` +} + +// LoadBalancerPage is the page returned by a pager when traversing over a +// collection of load balancers. +type LoadBalancerPage struct { + pagination.LinkedPageBase +} + +// NextPageURL is invoked when a paginated collection of load balancers has +// reached the end of a page and the pager seeks to traverse over a new one. +// In order to do this, it needs to construct the next page's URL. +func (r LoadBalancerPage) NextPageURL() (string, error) { + var s struct { + Links []gophercloud.Link `json:"loadbalancers_links"` + } + err := r.ExtractInto(&s) + if err != nil { + return "", err + } + return gophercloud.ExtractNextURL(s.Links) +} + +// IsEmpty checks whether a LoadBalancerPage struct is empty. +func (r LoadBalancerPage) IsEmpty() (bool, error) { + is, err := ExtractLoadBalancers(r) + return len(is) == 0, err +} + +// ExtractLoadBalancers accepts a Page struct, specifically a LoadbalancerPage +// struct, and extracts the elements into a slice of LoadBalancer structs. In +// other words, a generic collection is mapped into a relevant slice. +func ExtractLoadBalancers(r pagination.Page) ([]LoadBalancer, error) { + var s struct { + LoadBalancers []LoadBalancer `json:"loadbalancers"` + } + err := (r.(LoadBalancerPage)).ExtractInto(&s) + return s.LoadBalancers, err +} + +type commonResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts a loadbalancer. +func (r commonResult) Extract() (*LoadBalancer, error) { + var s struct { + LoadBalancer *LoadBalancer `json:"loadbalancer"` + } + err := r.ExtractInto(&s) + return s.LoadBalancer, err +} + +// GetStatusesResult represents the result of a GetStatuses operation. +// Call its Extract method to interpret it as a StatusTree. +type GetStatusesResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts the status of +// a Loadbalancer. +func (r GetStatusesResult) Extract() (*StatusTree, error) { + var s struct { + Statuses *StatusTree `json:"statuses"` + } + err := r.ExtractInto(&s) + return s.Statuses, err +} + +// StatsResult represents the result of a GetStats operation. +// Call its Extract method to interpret it as a Stats. +type StatsResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts the status of +// a Loadbalancer. +func (r StatsResult) Extract() (*Stats, error) { + var s struct { + Stats *Stats `json:"stats"` + } + err := r.ExtractInto(&s) + return s.Stats, err +} + +// CreateResult represents the result of a create operation. Call its Extract +// method to interpret it as a LoadBalancer. +type CreateResult struct { + commonResult +} + +// GetResult represents the result of a get operation. Call its Extract +// method to interpret it as a LoadBalancer. +type GetResult struct { + commonResult +} + +// UpdateResult represents the result of an update operation. Call its Extract +// method to interpret it as a LoadBalancer. +type UpdateResult struct { + commonResult +} + +// DeleteResult represents the result of a delete operation. Call its +// ExtractErr method to determine if the request succeeded or failed. +type DeleteResult struct { + gophercloud.ErrResult +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/urls.go new file mode 100644 index 0000000000..70267c358d --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers/urls.go @@ -0,0 +1,26 @@ +package loadbalancers + +import "github.com/gophercloud/gophercloud" + +const ( + rootPath = "lbaas" + resourcePath = "loadbalancers" + statusPath = "status" + statisticsPath = "stats" +) + +func rootURL(c *gophercloud.ServiceClient) string { + return c.ServiceURL(rootPath, resourcePath) +} + +func resourceURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id) +} + +func statusRootURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id, statusPath) +} + +func statisticsRootURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id, statisticsPath) +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/BUILD.bazel index cdc452abc7..d9fe4fced1 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors", importpath = "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/doc.go new file mode 100644 index 0000000000..6ed8c8fb5f --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/doc.go @@ -0,0 +1,69 @@ +/* +Package monitors provides information and interaction with Monitors +of the LBaaS v2 extension for the OpenStack Networking service. + +Example to List Monitors + + listOpts := monitors.ListOpts{ + PoolID: "c79a4468-d788-410c-bf79-9a8ef6354852", + } + + allPages, err := monitors.List(networkClient, listOpts).AllPages() + if err != nil { + panic(err) + } + + allMonitors, err := monitors.ExtractMonitors(allPages) + if err != nil { + panic(err) + } + + for _, monitor := range allMonitors { + fmt.Printf("%+v\n", monitor) + } + +Example to Create a Monitor + + createOpts := monitors.CreateOpts{ + Type: "HTTP", + Name: "db", + PoolID: "84f1b61f-58c4-45bf-a8a9-2dafb9e5214d", + Delay: 20, + Timeout: 10, + MaxRetries: 5, + URLPath: "/check", + ExpectedCodes: "200-299", + } + + monitor, err := monitors.Create(networkClient, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Update a Monitor + + monitorID := "d67d56a6-4a86-4688-a282-f46444705c64" + + updateOpts := monitors.UpdateOpts{ + Name: "NewHealthmonitorName", + Delay: 3, + Timeout: 20, + MaxRetries: 10, + URLPath: "/another_check", + ExpectedCodes: "301", + } + + monitor, err := monitors.Update(networkClient, monitorID, updateOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a Monitor + + monitorID := "d67d56a6-4a86-4688-a282-f46444705c64" + err := monitors.Delete(networkClient, monitorID).ExtractErr() + if err != nil { + panic(err) + } +*/ +package monitors diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go new file mode 100644 index 0000000000..c173e1c64e --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/requests.go @@ -0,0 +1,257 @@ +package monitors + +import ( + "fmt" + + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +// ListOptsBuilder allows extensions to add additional parameters to the +// List request. +type ListOptsBuilder interface { + ToMonitorListQuery() (string, error) +} + +// ListOpts allows the filtering and sorting of paginated collections through +// the API. Filtering is achieved by passing in struct field values that map to +// the Monitor attributes you want to see returned. SortKey allows you to +// sort by a particular Monitor attribute. SortDir sets the direction, and is +// either `asc' or `desc'. Marker and Limit are used for pagination. +type ListOpts struct { + ID string `q:"id"` + Name string `q:"name"` + TenantID string `q:"tenant_id"` + ProjectID string `q:"project_id"` + PoolID string `q:"pool_id"` + Type string `q:"type"` + Delay int `q:"delay"` + Timeout int `q:"timeout"` + MaxRetries int `q:"max_retries"` + HTTPMethod string `q:"http_method"` + URLPath string `q:"url_path"` + ExpectedCodes string `q:"expected_codes"` + AdminStateUp *bool `q:"admin_state_up"` + Status string `q:"status"` + Limit int `q:"limit"` + Marker string `q:"marker"` + SortKey string `q:"sort_key"` + SortDir string `q:"sort_dir"` +} + +// ToMonitorListQuery formats a ListOpts into a query string. +func (opts ListOpts) ToMonitorListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + if err != nil { + return "", err + } + return q.String(), nil +} + +// List returns a Pager which allows you to iterate over a collection of +// health monitors. It accepts a ListOpts struct, which allows you to filter and sort +// the returned collection for greater efficiency. +// +// Default policy settings return only those health monitors that are owned by the +// tenant who submits the request, unless an admin user submits the request. +func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager { + url := rootURL(c) + if opts != nil { + query, err := opts.ToMonitorListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(c, url, func(r pagination.PageResult) pagination.Page { + return MonitorPage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +// Constants that represent approved monitoring types. +const ( + TypePING = "PING" + TypeTCP = "TCP" + TypeHTTP = "HTTP" + TypeHTTPS = "HTTPS" +) + +var ( + errDelayMustGETimeout = fmt.Errorf("Delay must be greater than or equal to timeout") +) + +// CreateOptsBuilder allows extensions to add additional parameters to the +// List request. +type CreateOptsBuilder interface { + ToMonitorCreateMap() (map[string]interface{}, error) +} + +// CreateOpts is the common options struct used in this package's Create +// operation. +type CreateOpts struct { + // The Pool to Monitor. + PoolID string `json:"pool_id" required:"true"` + + // The type of probe, which is PING, TCP, HTTP, or HTTPS, that is + // sent by the load balancer to verify the member state. + Type string `json:"type" required:"true"` + + // The time, in seconds, between sending probes to members. + Delay int `json:"delay" required:"true"` + + // Maximum number of seconds for a Monitor to wait for a ping reply + // before it times out. The value must be less than the delay value. + Timeout int `json:"timeout" required:"true"` + + // Number of permissible ping failures before changing the member's + // status to INACTIVE. Must be a number between 1 and 10. + MaxRetries int `json:"max_retries" required:"true"` + + // URI path that will be accessed if Monitor type is HTTP or HTTPS. + // Required for HTTP(S) types. + URLPath string `json:"url_path,omitempty"` + + // The HTTP method used for requests by the Monitor. If this attribute + // is not specified, it defaults to "GET". Required for HTTP(S) types. + HTTPMethod string `json:"http_method,omitempty"` + + // Expected HTTP codes for a passing HTTP(S) Monitor. You can either specify + // a single status like "200", or a range like "200-202". Required for HTTP(S) + // types. + ExpectedCodes string `json:"expected_codes,omitempty"` + + // TenantID is the UUID of the project who owns the Monitor. + // Only administrative users can specify a project UUID other than their own. + TenantID string `json:"tenant_id,omitempty"` + + // ProjectID is the UUID of the project who owns the Monitor. + // Only administrative users can specify a project UUID other than their own. + ProjectID string `json:"project_id,omitempty"` + + // The Name of the Monitor. + Name string `json:"name,omitempty"` + + // The administrative state of the Monitor. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToMonitorCreateMap builds a request body from CreateOpts. +func (opts CreateOpts) ToMonitorCreateMap() (map[string]interface{}, error) { + b, err := gophercloud.BuildRequestBody(opts, "healthmonitor") + if err != nil { + return nil, err + } + + switch opts.Type { + case TypeHTTP, TypeHTTPS: + switch opts.URLPath { + case "": + return nil, fmt.Errorf("URLPath must be provided for HTTP and HTTPS") + } + switch opts.ExpectedCodes { + case "": + return nil, fmt.Errorf("ExpectedCodes must be provided for HTTP and HTTPS") + } + } + + return b, nil +} + +/* + Create is an operation which provisions a new Health Monitor. There are + different types of Monitor you can provision: PING, TCP or HTTP(S). Below + are examples of how to create each one. + + Here is an example config struct to use when creating a PING or TCP Monitor: + + CreateOpts{Type: TypePING, Delay: 20, Timeout: 10, MaxRetries: 3} + CreateOpts{Type: TypeTCP, Delay: 20, Timeout: 10, MaxRetries: 3} + + Here is an example config struct to use when creating a HTTP(S) Monitor: + + CreateOpts{Type: TypeHTTP, Delay: 20, Timeout: 10, MaxRetries: 3, + HttpMethod: "HEAD", ExpectedCodes: "200", PoolID: "2c946bfc-1804-43ab-a2ff-58f6a762b505"} +*/ +func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToMonitorCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Post(rootURL(c), b, &r.Body, nil) + return +} + +// Get retrieves a particular Health Monitor based on its unique ID. +func Get(c *gophercloud.ServiceClient, id string) (r GetResult) { + _, r.Err = c.Get(resourceURL(c, id), &r.Body, nil) + return +} + +// UpdateOptsBuilder allows extensions to add additional parameters to the +// Update request. +type UpdateOptsBuilder interface { + ToMonitorUpdateMap() (map[string]interface{}, error) +} + +// UpdateOpts is the common options struct used in this package's Update +// operation. +type UpdateOpts struct { + // The time, in seconds, between sending probes to members. + Delay int `json:"delay,omitempty"` + + // Maximum number of seconds for a Monitor to wait for a ping reply + // before it times out. The value must be less than the delay value. + Timeout int `json:"timeout,omitempty"` + + // Number of permissible ping failures before changing the member's + // status to INACTIVE. Must be a number between 1 and 10. + MaxRetries int `json:"max_retries,omitempty"` + + // URI path that will be accessed if Monitor type is HTTP or HTTPS. + // Required for HTTP(S) types. + URLPath string `json:"url_path,omitempty"` + + // The HTTP method used for requests by the Monitor. If this attribute + // is not specified, it defaults to "GET". Required for HTTP(S) types. + HTTPMethod string `json:"http_method,omitempty"` + + // Expected HTTP codes for a passing HTTP(S) Monitor. You can either specify + // a single status like "200", or a range like "200-202". Required for HTTP(S) + // types. + ExpectedCodes string `json:"expected_codes,omitempty"` + + // The Name of the Monitor. + Name string `json:"name,omitempty"` + + // The administrative state of the Monitor. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToMonitorUpdateMap builds a request body from UpdateOpts. +func (opts UpdateOpts) ToMonitorUpdateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "healthmonitor") +} + +// Update is an operation which modifies the attributes of the specified +// Monitor. +func Update(c *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult) { + b, err := opts.ToMonitorUpdateMap() + if err != nil { + r.Err = err + return + } + + _, r.Err = c.Put(resourceURL(c, id), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 202}, + }) + return +} + +// Delete will permanently delete a particular Monitor based on its unique ID. +func Delete(c *gophercloud.ServiceClient, id string) (r DeleteResult) { + _, r.Err = c.Delete(resourceURL(c, id), nil) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/results.go new file mode 100644 index 0000000000..ccf7d98509 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/results.go @@ -0,0 +1,153 @@ +package monitors + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +type PoolID struct { + ID string `json:"id"` +} + +// Monitor represents a load balancer health monitor. A health monitor is used +// to determine whether or not back-end members of the VIP's pool are usable +// for processing a request. A pool can have several health monitors associated +// with it. There are different types of health monitors supported: +// +// PING: used to ping the members using ICMP. +// TCP: used to connect to the members using TCP. +// HTTP: used to send an HTTP request to the member. +// HTTPS: used to send a secure HTTP request to the member. +// +// When a pool has several monitors associated with it, each member of the pool +// is monitored by all these monitors. If any monitor declares the member as +// unhealthy, then the member status is changed to INACTIVE and the member +// won't participate in its pool's load balancing. In other words, ALL monitors +// must declare the member to be healthy for it to stay ACTIVE. +type Monitor struct { + // The unique ID for the Monitor. + ID string `json:"id"` + + // The Name of the Monitor. + Name string `json:"name"` + + // The owner of the Monitor. + ProjectID string `json:"project_id"` + + // The type of probe sent by the load balancer to verify the member state, + // which is PING, TCP, HTTP, or HTTPS. + Type string `json:"type"` + + // The time, in seconds, between sending probes to members. + Delay int `json:"delay"` + + // The maximum number of seconds for a monitor to wait for a connection to be + // established before it times out. This value must be less than the delay + // value. + Timeout int `json:"timeout"` + + // Number of allowed connection failures before changing the status of the + // member to INACTIVE. A valid value is from 1 to 10. + MaxRetries int `json:"max_retries"` + + // The HTTP method that the monitor uses for requests. + HTTPMethod string `json:"http_method"` + + // The HTTP path of the request sent by the monitor to test the health of a + // member. Must be a string beginning with a forward slash (/). + URLPath string `json:"url_path" ` + + // Expected HTTP codes for a passing HTTP(S) monitor. + ExpectedCodes string `json:"expected_codes"` + + // The administrative state of the health monitor, which is up (true) or + // down (false). + AdminStateUp bool `json:"admin_state_up"` + + // The status of the health monitor. Indicates whether the health monitor is + // operational. + Status string `json:"status"` + + // List of pools that are associated with the health monitor. + Pools []PoolID `json:"pools"` + + // The provisioning status of the Monitor. + // This value is ACTIVE, PENDING_* or ERROR. + ProvisioningStatus string `json:"provisioning_status"` +} + +// MonitorPage is the page returned by a pager when traversing over a +// collection of health monitors. +type MonitorPage struct { + pagination.LinkedPageBase +} + +// NextPageURL is invoked when a paginated collection of monitors has reached +// the end of a page and the pager seeks to traverse over a new one. In order +// to do this, it needs to construct the next page's URL. +func (r MonitorPage) NextPageURL() (string, error) { + var s struct { + Links []gophercloud.Link `json:"healthmonitors_links"` + } + + err := r.ExtractInto(&s) + if err != nil { + return "", err + } + + return gophercloud.ExtractNextURL(s.Links) +} + +// IsEmpty checks whether a MonitorPage struct is empty. +func (r MonitorPage) IsEmpty() (bool, error) { + is, err := ExtractMonitors(r) + return len(is) == 0, err +} + +// ExtractMonitors accepts a Page struct, specifically a MonitorPage struct, +// and extracts the elements into a slice of Monitor structs. In other words, +// a generic collection is mapped into a relevant slice. +func ExtractMonitors(r pagination.Page) ([]Monitor, error) { + var s struct { + Monitors []Monitor `json:"healthmonitors"` + } + err := (r.(MonitorPage)).ExtractInto(&s) + return s.Monitors, err +} + +type commonResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts a monitor. +func (r commonResult) Extract() (*Monitor, error) { + var s struct { + Monitor *Monitor `json:"healthmonitor"` + } + err := r.ExtractInto(&s) + return s.Monitor, err +} + +// CreateResult represents the result of a create operation. Call its Extract +// method to interpret it as a Monitor. +type CreateResult struct { + commonResult +} + +// GetResult represents the result of a get operation. Call its Extract +// method to interpret it as a Monitor. +type GetResult struct { + commonResult +} + +// UpdateResult represents the result of an update operation. Call its Extract +// method to interpret it as a Monitor. +type UpdateResult struct { + commonResult +} + +// DeleteResult represents the result of a delete operation. Call its +// ExtractErr method to determine if the result succeeded or failed. +type DeleteResult struct { + gophercloud.ErrResult +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/urls.go new file mode 100644 index 0000000000..a222e52a93 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors/urls.go @@ -0,0 +1,16 @@ +package monitors + +import "github.com/gophercloud/gophercloud" + +const ( + rootPath = "lbaas" + resourcePath = "healthmonitors" +) + +func rootURL(c *gophercloud.ServiceClient) string { + return c.ServiceURL(rootPath, resourcePath) +} + +func resourceURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id) +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/BUILD.bazel index b3386bd7ff..35d824d759 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools", importpath = "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/doc.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/doc.go new file mode 100644 index 0000000000..2d57ed4393 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/doc.go @@ -0,0 +1,124 @@ +/* +Package pools provides information and interaction with Pools and +Members of the LBaaS v2 extension for the OpenStack Networking service. + +Example to List Pools + + listOpts := pools.ListOpts{ + LoadbalancerID: "c79a4468-d788-410c-bf79-9a8ef6354852", + } + + allPages, err := pools.List(networkClient, listOpts).AllPages() + if err != nil { + panic(err) + } + + allPools, err := pools.ExtractMonitors(allPages) + if err != nil { + panic(err) + } + + for _, pools := range allPools { + fmt.Printf("%+v\n", pool) + } + +Example to Create a Pool + + createOpts := pools.CreateOpts{ + LBMethod: pools.LBMethodRoundRobin, + Protocol: "HTTP", + Name: "Example pool", + LoadbalancerID: "79e05663-7f03-45d2-a092-8b94062f22ab", + } + + pool, err := pools.Create(networkClient, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Update a Pool + + poolID := "d67d56a6-4a86-4688-a282-f46444705c64" + + updateOpts := pools.UpdateOpts{ + Name: "new-name", + } + + pool, err := pools.Update(networkClient, poolID, updateOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a Pool + + poolID := "d67d56a6-4a86-4688-a282-f46444705c64" + err := pools.Delete(networkClient, poolID).ExtractErr() + if err != nil { + panic(err) + } + +Example to List Pool Members + + poolID := "d67d56a6-4a86-4688-a282-f46444705c64" + + listOpts := pools.ListMemberOpts{ + ProtocolPort: 80, + } + + allPages, err := pools.ListMembers(networkClient, poolID, listOpts).AllPages() + if err != nil { + panic(err) + } + + allMembers, err := pools.ExtractMembers(allPages) + if err != nil { + panic(err) + } + + for _, member := allMembers { + fmt.Printf("%+v\n", member) + } + +Example to Create a Member + + poolID := "d67d56a6-4a86-4688-a282-f46444705c64" + + createOpts := pools.CreateMemberOpts{ + Name: "db", + SubnetID: "1981f108-3c48-48d2-b908-30f7d28532c9", + Address: "10.0.2.11", + ProtocolPort: 80, + Weight: 10, + } + + member, err := pools.CreateMember(networkClient, poolID, createOpts).Extract() + if err != nil { + panic(err) + } + +Example to Update a Member + + poolID := "d67d56a6-4a86-4688-a282-f46444705c64" + memberID := "64dba99f-8af8-4200-8882-e32a0660f23e" + + updateOpts := pools.UpdateMemberOpts{ + Name: "new-name", + Weight: 4, + } + + member, err := pools.UpdateMember(networkClient, poolID, memberID, updateOpts).Extract() + if err != nil { + panic(err) + } + +Example to Delete a Member + + poolID := "d67d56a6-4a86-4688-a282-f46444705c64" + memberID := "64dba99f-8af8-4200-8882-e32a0660f23e" + + err := pools.DeleteMember(networkClient, poolID, memberID).ExtractErr() + if err != nil { + panic(err) + } +*/ +package pools diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go new file mode 100644 index 0000000000..538b2f1b2a --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/requests.go @@ -0,0 +1,346 @@ +package pools + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/pagination" +) + +// ListOptsBuilder allows extensions to add additional parameters to the +// List request. +type ListOptsBuilder interface { + ToPoolListQuery() (string, error) +} + +// ListOpts allows the filtering and sorting of paginated collections through +// the API. Filtering is achieved by passing in struct field values that map to +// the Pool attributes you want to see returned. SortKey allows you to +// sort by a particular Pool attribute. SortDir sets the direction, and is +// either `asc' or `desc'. Marker and Limit are used for pagination. +type ListOpts struct { + LBMethod string `q:"lb_algorithm"` + Protocol string `q:"protocol"` + ProjectID string `q:"project_id"` + AdminStateUp *bool `q:"admin_state_up"` + Name string `q:"name"` + ID string `q:"id"` + LoadbalancerID string `q:"loadbalancer_id"` + Limit int `q:"limit"` + Marker string `q:"marker"` + SortKey string `q:"sort_key"` + SortDir string `q:"sort_dir"` +} + +// ToPoolListQuery formats a ListOpts into a query string. +func (opts ListOpts) ToPoolListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// List returns a Pager which allows you to iterate over a collection of +// pools. It accepts a ListOpts struct, which allows you to filter and sort +// the returned collection for greater efficiency. +// +// Default policy settings return only those pools that are owned by the +// project who submits the request, unless an admin user submits the request. +func List(c *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager { + url := rootURL(c) + if opts != nil { + query, err := opts.ToPoolListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(c, url, func(r pagination.PageResult) pagination.Page { + return PoolPage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +type LBMethod string +type Protocol string + +// Supported attributes for create/update operations. +const ( + LBMethodRoundRobin LBMethod = "ROUND_ROBIN" + LBMethodLeastConnections LBMethod = "LEAST_CONNECTIONS" + LBMethodSourceIp LBMethod = "SOURCE_IP" + + ProtocolTCP Protocol = "TCP" + ProtocolHTTP Protocol = "HTTP" + ProtocolHTTPS Protocol = "HTTPS" +) + +// CreateOptsBuilder allows extensions to add additional parameters to the +// Create request. +type CreateOptsBuilder interface { + ToPoolCreateMap() (map[string]interface{}, error) +} + +// CreateOpts is the common options struct used in this package's Create +// operation. +type CreateOpts struct { + // The algorithm used to distribute load between the members of the pool. The + // current specification supports LBMethodRoundRobin, LBMethodLeastConnections + // and LBMethodSourceIp as valid values for this attribute. + LBMethod LBMethod `json:"lb_algorithm" required:"true"` + + // The protocol used by the pool members, you can use either + // ProtocolTCP, ProtocolHTTP, or ProtocolHTTPS. + Protocol Protocol `json:"protocol" required:"true"` + + // The Loadbalancer on which the members of the pool will be associated with. + // Note: one of LoadbalancerID or ListenerID must be provided. + LoadbalancerID string `json:"loadbalancer_id,omitempty" xor:"ListenerID"` + + // The Listener on which the members of the pool will be associated with. + // Note: one of LoadbalancerID or ListenerID must be provided. + ListenerID string `json:"listener_id,omitempty" xor:"LoadbalancerID"` + + // ProjectID is the UUID of the project who owns the Pool. + // Only administrative users can specify a project UUID other than their own. + ProjectID string `json:"project_id,omitempty"` + + // Name of the pool. + Name string `json:"name,omitempty"` + + // Human-readable description for the pool. + Description string `json:"description,omitempty"` + + // Persistence is the session persistence of the pool. + // Omit this field to prevent session persistence. + Persistence *SessionPersistence `json:"session_persistence,omitempty"` + + // The administrative state of the Pool. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToPoolCreateMap builds a request body from CreateOpts. +func (opts CreateOpts) ToPoolCreateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "pool") +} + +// Create accepts a CreateOpts struct and uses the values to create a new +// load balancer pool. +func Create(c *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult) { + b, err := opts.ToPoolCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Post(rootURL(c), b, &r.Body, nil) + return +} + +// Get retrieves a particular pool based on its unique ID. +func Get(c *gophercloud.ServiceClient, id string) (r GetResult) { + _, r.Err = c.Get(resourceURL(c, id), &r.Body, nil) + return +} + +// UpdateOptsBuilder allows extensions to add additional parameters to the +// Update request. +type UpdateOptsBuilder interface { + ToPoolUpdateMap() (map[string]interface{}, error) +} + +// UpdateOpts is the common options struct used in this package's Update +// operation. +type UpdateOpts struct { + // Name of the pool. + Name string `json:"name,omitempty"` + + // Human-readable description for the pool. + Description string `json:"description,omitempty"` + + // The algorithm used to distribute load between the members of the pool. The + // current specification supports LBMethodRoundRobin, LBMethodLeastConnections + // and LBMethodSourceIp as valid values for this attribute. + LBMethod LBMethod `json:"lb_algorithm,omitempty"` + + // The administrative state of the Pool. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToPoolUpdateMap builds a request body from UpdateOpts. +func (opts UpdateOpts) ToPoolUpdateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "pool") +} + +// Update allows pools to be updated. +func Update(c *gophercloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult) { + b, err := opts.ToPoolUpdateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Put(resourceURL(c, id), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200}, + }) + return +} + +// Delete will permanently delete a particular pool based on its unique ID. +func Delete(c *gophercloud.ServiceClient, id string) (r DeleteResult) { + _, r.Err = c.Delete(resourceURL(c, id), nil) + return +} + +// ListMemberOptsBuilder allows extensions to add additional parameters to the +// ListMembers request. +type ListMembersOptsBuilder interface { + ToMembersListQuery() (string, error) +} + +// ListMembersOpts allows the filtering and sorting of paginated collections +// through the API. Filtering is achieved by passing in struct field values +// that map to the Member attributes you want to see returned. SortKey allows +// you to sort by a particular Member attribute. SortDir sets the direction, +// and is either `asc' or `desc'. Marker and Limit are used for pagination. +type ListMembersOpts struct { + Name string `q:"name"` + Weight int `q:"weight"` + AdminStateUp *bool `q:"admin_state_up"` + ProjectID string `q:"project_id"` + Address string `q:"address"` + ProtocolPort int `q:"protocol_port"` + ID string `q:"id"` + Limit int `q:"limit"` + Marker string `q:"marker"` + SortKey string `q:"sort_key"` + SortDir string `q:"sort_dir"` +} + +// ToMemberListQuery formats a ListOpts into a query string. +func (opts ListMembersOpts) ToMembersListQuery() (string, error) { + q, err := gophercloud.BuildQueryString(opts) + return q.String(), err +} + +// ListMembers returns a Pager which allows you to iterate over a collection of +// members. It accepts a ListMembersOptsBuilder, which allows you to filter and +// sort the returned collection for greater efficiency. +// +// Default policy settings return only those members that are owned by the +// project who submits the request, unless an admin user submits the request. +func ListMembers(c *gophercloud.ServiceClient, poolID string, opts ListMembersOptsBuilder) pagination.Pager { + url := memberRootURL(c, poolID) + if opts != nil { + query, err := opts.ToMembersListQuery() + if err != nil { + return pagination.Pager{Err: err} + } + url += query + } + return pagination.NewPager(c, url, func(r pagination.PageResult) pagination.Page { + return MemberPage{pagination.LinkedPageBase{PageResult: r}} + }) +} + +// CreateMemberOptsBuilder allows extensions to add additional parameters to the +// CreateMember request. +type CreateMemberOptsBuilder interface { + ToMemberCreateMap() (map[string]interface{}, error) +} + +// CreateMemberOpts is the common options struct used in this package's CreateMember +// operation. +type CreateMemberOpts struct { + // The IP address of the member to receive traffic from the load balancer. + Address string `json:"address" required:"true"` + + // The port on which to listen for client traffic. + ProtocolPort int `json:"protocol_port" required:"true"` + + // Name of the Member. + Name string `json:"name,omitempty"` + + // ProjectID is the UUID of the project who owns the Member. + // Only administrative users can specify a project UUID other than their own. + ProjectID string `json:"project_id,omitempty"` + + // A positive integer value that indicates the relative portion of traffic + // that this member should receive from the pool. For example, a member with + // a weight of 10 receives five times as much traffic as a member with a + // weight of 2. + Weight int `json:"weight,omitempty"` + + // If you omit this parameter, LBaaS uses the vip_subnet_id parameter value + // for the subnet UUID. + SubnetID string `json:"subnet_id,omitempty"` + + // The administrative state of the Pool. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToMemberCreateMap builds a request body from CreateMemberOpts. +func (opts CreateMemberOpts) ToMemberCreateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "member") +} + +// CreateMember will create and associate a Member with a particular Pool. +func CreateMember(c *gophercloud.ServiceClient, poolID string, opts CreateMemberOpts) (r CreateMemberResult) { + b, err := opts.ToMemberCreateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Post(memberRootURL(c, poolID), b, &r.Body, nil) + return +} + +// GetMember retrieves a particular Pool Member based on its unique ID. +func GetMember(c *gophercloud.ServiceClient, poolID string, memberID string) (r GetMemberResult) { + _, r.Err = c.Get(memberResourceURL(c, poolID, memberID), &r.Body, nil) + return +} + +// UpdateMemberOptsBuilder allows extensions to add additional parameters to the +// List request. +type UpdateMemberOptsBuilder interface { + ToMemberUpdateMap() (map[string]interface{}, error) +} + +// UpdateMemberOpts is the common options struct used in this package's Update +// operation. +type UpdateMemberOpts struct { + // Name of the Member. + Name string `json:"name,omitempty"` + + // A positive integer value that indicates the relative portion of traffic + // that this member should receive from the pool. For example, a member with + // a weight of 10 receives five times as much traffic as a member with a + // weight of 2. + Weight int `json:"weight,omitempty"` + + // The administrative state of the Pool. A valid value is true (UP) + // or false (DOWN). + AdminStateUp *bool `json:"admin_state_up,omitempty"` +} + +// ToMemberUpdateMap builds a request body from UpdateMemberOpts. +func (opts UpdateMemberOpts) ToMemberUpdateMap() (map[string]interface{}, error) { + return gophercloud.BuildRequestBody(opts, "member") +} + +// Update allows Member to be updated. +func UpdateMember(c *gophercloud.ServiceClient, poolID string, memberID string, opts UpdateMemberOptsBuilder) (r UpdateMemberResult) { + b, err := opts.ToMemberUpdateMap() + if err != nil { + r.Err = err + return + } + _, r.Err = c.Put(memberResourceURL(c, poolID, memberID), b, &r.Body, &gophercloud.RequestOpts{ + OkCodes: []int{200, 201, 202}, + }) + return +} + +// DisassociateMember will remove and disassociate a Member from a particular +// Pool. +func DeleteMember(c *gophercloud.ServiceClient, poolID string, memberID string) (r DeleteMemberResult) { + _, r.Err = c.Delete(memberResourceURL(c, poolID, memberID), nil) + return +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go new file mode 100644 index 0000000000..fe0d93325f --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/results.go @@ -0,0 +1,281 @@ +package pools + +import ( + "github.com/gophercloud/gophercloud" + "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/monitors" + "github.com/gophercloud/gophercloud/pagination" +) + +// SessionPersistence represents the session persistence feature of the load +// balancing service. It attempts to force connections or requests in the same +// session to be processed by the same member as long as it is ative. Three +// types of persistence are supported: +// +// SOURCE_IP: With this mode, all connections originating from the same source +// IP address, will be handled by the same Member of the Pool. +// HTTP_COOKIE: With this persistence mode, the load balancing function will +// create a cookie on the first request from a client. Subsequent +// requests containing the same cookie value will be handled by +// the same Member of the Pool. +// APP_COOKIE: With this persistence mode, the load balancing function will +// rely on a cookie established by the backend application. All +// requests carrying the same cookie value will be handled by the +// same Member of the Pool. +type SessionPersistence struct { + // The type of persistence mode. + Type string `json:"type"` + + // Name of cookie if persistence mode is set appropriately. + CookieName string `json:"cookie_name,omitempty"` +} + +// LoadBalancerID represents a load balancer. +type LoadBalancerID struct { + ID string `json:"id"` +} + +// ListenerID represents a listener. +type ListenerID struct { + ID string `json:"id"` +} + +// Pool represents a logical set of devices, such as web servers, that you +// group together to receive and process traffic. The load balancing function +// chooses a Member of the Pool according to the configured load balancing +// method to handle the new requests or connections received on the VIP address. +type Pool struct { + // The load-balancer algorithm, which is round-robin, least-connections, and + // so on. This value, which must be supported, is dependent on the provider. + // Round-robin must be supported. + LBMethod string `json:"lb_algorithm"` + + // The protocol of the Pool, which is TCP, HTTP, or HTTPS. + Protocol string `json:"protocol"` + + // Description for the Pool. + Description string `json:"description"` + + // A list of listeners objects IDs. + Listeners []ListenerID `json:"listeners"` //[]map[string]interface{} + + // A list of member objects IDs. + Members []Member `json:"members"` + + // The ID of associated health monitor. + MonitorID string `json:"healthmonitor_id"` + + // The network on which the members of the Pool will be located. Only members + // that are on this network can be added to the Pool. + SubnetID string `json:"subnet_id"` + + // Owner of the Pool. + ProjectID string `json:"project_id"` + + // The administrative state of the Pool, which is up (true) or down (false). + AdminStateUp bool `json:"admin_state_up"` + + // Pool name. Does not have to be unique. + Name string `json:"name"` + + // The unique ID for the Pool. + ID string `json:"id"` + + // A list of load balancer objects IDs. + Loadbalancers []LoadBalancerID `json:"loadbalancers"` + + // Indicates whether connections in the same session will be processed by the + // same Pool member or not. + Persistence SessionPersistence `json:"session_persistence"` + + // The load balancer provider. + Provider string `json:"provider"` + + // The Monitor associated with this Pool. + Monitor monitors.Monitor `json:"healthmonitor"` + + // The provisioning status of the pool. + // This value is ACTIVE, PENDING_* or ERROR. + ProvisioningStatus string `json:"provisioning_status"` +} + +// PoolPage is the page returned by a pager when traversing over a +// collection of pools. +type PoolPage struct { + pagination.LinkedPageBase +} + +// NextPageURL is invoked when a paginated collection of pools has reached +// the end of a page and the pager seeks to traverse over a new one. In order +// to do this, it needs to construct the next page's URL. +func (r PoolPage) NextPageURL() (string, error) { + var s struct { + Links []gophercloud.Link `json:"pools_links"` + } + err := r.ExtractInto(&s) + if err != nil { + return "", err + } + return gophercloud.ExtractNextURL(s.Links) +} + +// IsEmpty checks whether a PoolPage struct is empty. +func (r PoolPage) IsEmpty() (bool, error) { + is, err := ExtractPools(r) + return len(is) == 0, err +} + +// ExtractPools accepts a Page struct, specifically a PoolPage struct, +// and extracts the elements into a slice of Pool structs. In other words, +// a generic collection is mapped into a relevant slice. +func ExtractPools(r pagination.Page) ([]Pool, error) { + var s struct { + Pools []Pool `json:"pools"` + } + err := (r.(PoolPage)).ExtractInto(&s) + return s.Pools, err +} + +type commonResult struct { + gophercloud.Result +} + +// Extract is a function that accepts a result and extracts a pool. +func (r commonResult) Extract() (*Pool, error) { + var s struct { + Pool *Pool `json:"pool"` + } + err := r.ExtractInto(&s) + return s.Pool, err +} + +// CreateResult represents the result of a Create operation. Call its Extract +// method to interpret the result as a Pool. +type CreateResult struct { + commonResult +} + +// GetResult represents the result of a Get operation. Call its Extract +// method to interpret the result as a Pool. +type GetResult struct { + commonResult +} + +// UpdateResult represents the result of an Update operation. Call its Extract +// method to interpret the result as a Pool. +type UpdateResult struct { + commonResult +} + +// DeleteResult represents the result of a Delete operation. Call its +// ExtractErr method to determine if the request succeeded or failed. +type DeleteResult struct { + gophercloud.ErrResult +} + +// Member represents the application running on a backend server. +type Member struct { + // Name of the Member. + Name string `json:"name"` + + // Weight of Member. + Weight int `json:"weight"` + + // The administrative state of the member, which is up (true) or down (false). + AdminStateUp bool `json:"admin_state_up"` + + // Owner of the Member. + ProjectID string `json:"project_id"` + + // Parameter value for the subnet UUID. + SubnetID string `json:"subnet_id"` + + // The Pool to which the Member belongs. + PoolID string `json:"pool_id"` + + // The IP address of the Member. + Address string `json:"address"` + + // The port on which the application is hosted. + ProtocolPort int `json:"protocol_port"` + + // The unique ID for the Member. + ID string `json:"id"` + + // The provisioning status of the pool. + // This value is ACTIVE, PENDING_* or ERROR. + ProvisioningStatus string `json:"provisioning_status"` +} + +// MemberPage is the page returned by a pager when traversing over a +// collection of Members in a Pool. +type MemberPage struct { + pagination.LinkedPageBase +} + +// NextPageURL is invoked when a paginated collection of members has reached +// the end of a page and the pager seeks to traverse over a new one. In order +// to do this, it needs to construct the next page's URL. +func (r MemberPage) NextPageURL() (string, error) { + var s struct { + Links []gophercloud.Link `json:"members_links"` + } + err := r.ExtractInto(&s) + if err != nil { + return "", err + } + return gophercloud.ExtractNextURL(s.Links) +} + +// IsEmpty checks whether a MemberPage struct is empty. +func (r MemberPage) IsEmpty() (bool, error) { + is, err := ExtractMembers(r) + return len(is) == 0, err +} + +// ExtractMembers accepts a Page struct, specifically a MemberPage struct, +// and extracts the elements into a slice of Members structs. In other words, +// a generic collection is mapped into a relevant slice. +func ExtractMembers(r pagination.Page) ([]Member, error) { + var s struct { + Members []Member `json:"members"` + } + err := (r.(MemberPage)).ExtractInto(&s) + return s.Members, err +} + +type commonMemberResult struct { + gophercloud.Result +} + +// ExtractMember is a function that accepts a result and extracts a member. +func (r commonMemberResult) Extract() (*Member, error) { + var s struct { + Member *Member `json:"member"` + } + err := r.ExtractInto(&s) + return s.Member, err +} + +// CreateMemberResult represents the result of a CreateMember operation. +// Call its Extract method to interpret it as a Member. +type CreateMemberResult struct { + commonMemberResult +} + +// GetMemberResult represents the result of a GetMember operation. +// Call its Extract method to interpret it as a Member. +type GetMemberResult struct { + commonMemberResult +} + +// UpdateMemberResult represents the result of an UpdateMember operation. +// Call its Extract method to interpret it as a Member. +type UpdateMemberResult struct { + commonMemberResult +} + +// DeleteMemberResult represents the result of a DeleteMember operation. +// Call its ExtractErr method to determine if the request succeeded or failed. +type DeleteMemberResult struct { + gophercloud.ErrResult +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/urls.go b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/urls.go new file mode 100644 index 0000000000..bceca67707 --- /dev/null +++ b/vendor/github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools/urls.go @@ -0,0 +1,25 @@ +package pools + +import "github.com/gophercloud/gophercloud" + +const ( + rootPath = "lbaas" + resourcePath = "pools" + memberPath = "members" +) + +func rootURL(c *gophercloud.ServiceClient) string { + return c.ServiceURL(rootPath, resourcePath) +} + +func resourceURL(c *gophercloud.ServiceClient, id string) string { + return c.ServiceURL(rootPath, resourcePath, id) +} + +func memberRootURL(c *gophercloud.ServiceClient, poolId string) string { + return c.ServiceURL(rootPath, resourcePath, poolId, memberPath) +} + +func memberResourceURL(c *gophercloud.ServiceClient, poolID string, memeberID string) string { + return c.ServiceURL(rootPath, resourcePath, poolID, memberPath, memeberID) +} diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external/BUILD.bazel index a3381726ab..836e23ab27 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external/BUILD.bazel @@ -7,7 +7,7 @@ go_library( "requests.go", "results.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external", importpath = "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/external", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/BUILD.bazel b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/BUILD.bazel index cd852faa05..962d6b77df 100644 --- a/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/BUILD.bazel +++ b/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/BUILD.bazel @@ -8,7 +8,7 @@ go_library( "results.go", "urls.go", ], - importmap = "vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", + importmap = "k8s.io/kops/vendor/github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", importpath = "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/github.com/howeyc/gopass/BUILD.bazel b/vendor/github.com/howeyc/gopass/BUILD.bazel deleted file mode 100644 index f496d16cca..0000000000 --- a/vendor/github.com/howeyc/gopass/BUILD.bazel +++ /dev/null @@ -1,49 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "pass.go", - "terminal.go", - "terminal_solaris.go", - ], - importmap = "vendor/github.com/howeyc/gopass", - importpath = "github.com/howeyc/gopass", - visibility = ["//visibility:public"], - deps = select({ - "@io_bazel_rules_go//go/platform:android": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:darwin": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:dragonfly": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:freebsd": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:nacl": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:netbsd": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:openbsd": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:plan9": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "@io_bazel_rules_go//go/platform:solaris": [ - "//vendor/golang.org/x/sys/unix:go_default_library", - ], - "@io_bazel_rules_go//go/platform:windows": [ - "//vendor/golang.org/x/crypto/ssh/terminal:go_default_library", - ], - "//conditions:default": [], - }), -) diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/BUILD.bazel b/vendor/github.com/spf13/cobra/cobra/cmd/BUILD.bazel index 75ba8dfb54..20f80688b0 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/BUILD.bazel +++ b/vendor/github.com/spf13/cobra/cobra/cmd/BUILD.bazel @@ -13,7 +13,7 @@ go_library( "license_mit.go", "licenses.go", ], - importmap = "vendor/github.com/spf13/cobra/cobra/cmd", + importmap = "k8s.io/kops/vendor/github.com/spf13/cobra/cobra/cmd", importpath = "github.com/spf13/cobra/cobra/cmd", visibility = ["//visibility:public"], deps = ["//vendor/github.com/spf13/viper:go_default_library"], diff --git a/vendor/github.com/vmware/govmomi/simulator/BUILD.bazel b/vendor/github.com/vmware/govmomi/simulator/BUILD.bazel index d5138a9578..f97264aa81 100644 --- a/vendor/github.com/vmware/govmomi/simulator/BUILD.bazel +++ b/vendor/github.com/vmware/govmomi/simulator/BUILD.bazel @@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["license_manager.go"], - importmap = "vendor/github.com/vmware/govmomi/simulator", + importmap = "k8s.io/kops/vendor/github.com/vmware/govmomi/simulator", importpath = "github.com/vmware/govmomi/simulator", visibility = ["//visibility:public"], deps = [ diff --git a/vendor/google.golang.org/api/tpu/v1alpha1/BUILD.bazel b/vendor/google.golang.org/api/tpu/v1alpha1/BUILD.bazel deleted file mode 100644 index 82bbf20286..0000000000 --- a/vendor/google.golang.org/api/tpu/v1alpha1/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["tpu-gen.go"], - importmap = "vendor/google.golang.org/api/tpu/v1alpha1", - importpath = "google.golang.org/api/tpu/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/golang.org/x/net/context/ctxhttp:go_default_library", - "//vendor/google.golang.org/api/gensupport:go_default_library", - "//vendor/google.golang.org/api/googleapi:go_default_library", - ], -) diff --git a/vendor/gopkg.in/mgo.v2/bson/BUILD.bazel b/vendor/gopkg.in/mgo.v2/bson/BUILD.bazel deleted file mode 100644 index 583aee788b..0000000000 --- a/vendor/gopkg.in/mgo.v2/bson/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "bson.go", - "decimal.go", - "decode.go", - "encode.go", - "json.go", - ], - importmap = "vendor/gopkg.in/mgo.v2/bson", - importpath = "gopkg.in/mgo.v2/bson", - visibility = ["//visibility:public"], - deps = ["//vendor/gopkg.in/mgo.v2/internal/json:go_default_library"], -) diff --git a/vendor/gopkg.in/mgo.v2/internal/json/BUILD.bazel b/vendor/gopkg.in/mgo.v2/internal/json/BUILD.bazel deleted file mode 100644 index 756f922670..0000000000 --- a/vendor/gopkg.in/mgo.v2/internal/json/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "decode.go", - "encode.go", - "extension.go", - "fold.go", - "indent.go", - "scanner.go", - "stream.go", - "tags.go", - ], - importmap = "vendor/gopkg.in/mgo.v2/internal/json", - importpath = "gopkg.in/mgo.v2/internal/json", - visibility = ["//vendor/gopkg.in/mgo.v2:__subpackages__"], -) diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/BUILD.bazel b/vendor/k8s.io/apimachinery/pkg/apimachinery/BUILD.bazel deleted file mode 100644 index fba1f89b5a..0000000000 --- a/vendor/k8s.io/apimachinery/pkg/apimachinery/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - ], - importmap = "vendor/k8s.io/apimachinery/pkg/apimachinery", - importpath = "k8s.io/apimachinery/pkg/apimachinery", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD.bazel b/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD.bazel deleted file mode 100644 index aff4d9f376..0000000000 --- a/vendor/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "announced.go", - "group_factory.go", - ], - importmap = "vendor/k8s.io/apimachinery/pkg/apimachinery/announced", - importpath = "k8s.io/apimachinery/pkg/apimachinery/announced", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) diff --git a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD.bazel b/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD.bazel deleted file mode 100644 index b7d7aacb75..0000000000 --- a/vendor/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["registered.go"], - importmap = "vendor/k8s.io/apimachinery/pkg/apimachinery/registered", - importpath = "k8s.io/apimachinery/pkg/apimachinery/registered", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) diff --git a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD.bazel deleted file mode 100644 index e3909dc21e..0000000000 --- a/vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "attributes.go", - "conversion.go", - "doc.go", - ], - importmap = "vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned", - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/versioned", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) diff --git a/vendor/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD.bazel b/vendor/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD.bazel deleted file mode 100644 index 17df371ea6..0000000000 --- a/vendor/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["checks.go"], - importmap = "vendor/k8s.io/apiserver/pkg/storage/etcd3/preflight", - importpath = "k8s.io/apiserver/pkg/storage/etcd3/preflight", - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/client-go/util/workqueue/BUILD.bazel b/vendor/k8s.io/client-go/util/workqueue/BUILD.bazel deleted file mode 100644 index 3d18a215c2..0000000000 --- a/vendor/k8s.io/client-go/util/workqueue/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "default_rate_limiters.go", - "delaying_queue.go", - "doc.go", - "metrics.go", - "parallelizer.go", - "queue.go", - "rate_limitting_queue.go", - ], - importmap = "vendor/k8s.io/client-go/util/workqueue", - importpath = "k8s.io/client-go/util/workqueue", - visibility = ["//visibility:public"], - deps = [ - "//vendor/golang.org/x/time/rate:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - ], -) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore deleted file mode 100644 index 0e9aa466bb..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -go-to-protobuf diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/BUILD.bazel b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/BUILD.bazel deleted file mode 100644 index 9ecd2309dc..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "vendor/k8s.io/code-generator/cmd/go-to-protobuf", - importpath = "k8s.io/code-generator/cmd/go-to-protobuf", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf:go_default_library", - ], -) - -go_binary( - name = "go-to-protobuf", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS deleted file mode 100644 index 05d4b2a657..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -approvers: -- smarterclayton -reviewers: -- smarterclayton diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/main.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/main.go deleted file mode 100644 index 847a6a5a02..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/main.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -// go-to-protobuf generates a Protobuf IDL from a Go struct, respecting any -// existing IDL tags on the Go struct. -package main - -import ( - goflag "flag" - - flag "github.com/spf13/pflag" - "k8s.io/code-generator/cmd/go-to-protobuf/protobuf" -) - -var g = protobuf.New() - -func init() { - g.BindFlags(flag.CommandLine) - goflag.Set("logtostderr", "true") - flag.CommandLine.AddGoFlagSet(goflag.CommandLine) -} - -func main() { - flag.Parse() - protobuf.Run(g) -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD.bazel b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD.bazel deleted file mode 100644 index 00baeb201e..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD.bazel +++ /dev/null @@ -1,28 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cmd.go", - "generator.go", - "import_tracker.go", - "namer.go", - "package.go", - "parser.go", - "tags.go", - ], - importmap = "vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf", - importpath = "k8s.io/code-generator/cmd/go-to-protobuf/protobuf", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/code-generator/third_party/forked/golang/reflect:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/parser:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go deleted file mode 100644 index 5550732259..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go +++ /dev/null @@ -1,349 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -// go-to-protobuf generates a Protobuf IDL from a Go struct, respecting any -// existing IDL tags on the Go struct. -package protobuf - -import ( - "bytes" - "fmt" - "log" - "os" - "os/exec" - "path/filepath" - "strings" - - "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" - - flag "github.com/spf13/pflag" -) - -type Generator struct { - Common args.GeneratorArgs - APIMachineryPackages string - Packages string - OutputBase string - VendorOutputBase string - ProtoImport []string - Conditional string - Clean bool - OnlyIDL bool - KeepGogoproto bool - SkipGeneratedRewrite bool - DropEmbeddedFields string -} - -func New() *Generator { - sourceTree := args.DefaultSourceTree() - common := args.GeneratorArgs{ - OutputBase: sourceTree, - GoHeaderFilePath: filepath.Join(sourceTree, util.BoilerplatePath()), - } - defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "vendor", "github.com", "gogo", "protobuf", "protobuf") - cwd, err := os.Getwd() - if err != nil { - log.Fatalf("Cannot get current directory.") - } - return &Generator{ - Common: common, - OutputBase: sourceTree, - VendorOutputBase: filepath.Join(cwd, "vendor"), - ProtoImport: []string{defaultProtoImport}, - APIMachineryPackages: strings.Join([]string{ - `+k8s.io/apimachinery/pkg/util/intstr`, - `+k8s.io/apimachinery/pkg/api/resource`, - `+k8s.io/apimachinery/pkg/runtime/schema`, - `+k8s.io/apimachinery/pkg/runtime`, - `k8s.io/apimachinery/pkg/apis/meta/v1`, - `k8s.io/apimachinery/pkg/apis/meta/v1beta1`, - `k8s.io/apimachinery/pkg/apis/testapigroup/v1`, - }, ","), - Packages: "", - DropEmbeddedFields: "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta", - } -} - -func (g *Generator) BindFlags(flag *flag.FlagSet) { - flag.StringVarP(&g.Common.GoHeaderFilePath, "go-header-file", "h", g.Common.GoHeaderFilePath, "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") - flag.BoolVar(&g.Common.VerifyOnly, "verify-only", g.Common.VerifyOnly, "If true, only verify existing output, do not write anything.") - flag.StringVarP(&g.Packages, "packages", "p", g.Packages, "comma-separated list of directories to get input types from. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") - flag.StringVar(&g.APIMachineryPackages, "apimachinery-packages", g.APIMachineryPackages, "comma-separated list of directories to get apimachinery input types from which are needed by any API. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") - flag.StringVarP(&g.OutputBase, "output-base", "o", g.OutputBase, "Output base; defaults to $GOPATH/src/") - flag.StringVar(&g.VendorOutputBase, "vendor-output-base", g.VendorOutputBase, "The vendor/ directory to look for packages in; defaults to $PWD/vendor/.") - flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "The search path for the core protobuf .protos, required; defaults $GOPATH/src/k8s.io/kubernetes/vendor/github.com/gogo/protobuf/protobuf.") - flag.StringVar(&g.Conditional, "conditional", g.Conditional, "An optional Golang build tag condition to add to the generated Go code") - flag.BoolVar(&g.Clean, "clean", g.Clean, "If true, remove all generated files for the specified Packages.") - flag.BoolVar(&g.OnlyIDL, "only-idl", g.OnlyIDL, "If true, only generate the IDL for each package.") - flag.BoolVar(&g.KeepGogoproto, "keep-gogoproto", g.KeepGogoproto, "If true, the generated IDL will contain gogoprotobuf extensions which are normally removed") - flag.BoolVar(&g.SkipGeneratedRewrite, "skip-generated-rewrite", g.SkipGeneratedRewrite, "If true, skip fixing up the generated.pb.go file (debugging only).") - flag.StringVar(&g.DropEmbeddedFields, "drop-embedded-fields", g.DropEmbeddedFields, "Comma-delimited list of embedded Go types to omit from generated protobufs") -} - -func Run(g *Generator) { - if g.Common.VerifyOnly { - g.OnlyIDL = true - g.Clean = false - } - - b := parser.New() - b.AddBuildTags("proto") - - omitTypes := map[types.Name]struct{}{} - for _, t := range strings.Split(g.DropEmbeddedFields, ",") { - name := types.Name{} - if i := strings.LastIndex(t, "."); i != -1 { - name.Package, name.Name = t[:i], t[i+1:] - } else { - name.Name = t - } - if len(name.Name) == 0 { - log.Fatalf("--drop-embedded-types requires names in the form of [GOPACKAGE.]TYPENAME: %v", t) - } - omitTypes[name] = struct{}{} - } - - boilerplate, err := g.Common.LoadGoBoilerplate() - if err != nil { - log.Fatalf("Failed loading boilerplate (consider using the go-header-file flag): %v", err) - } - - protobufNames := NewProtobufNamer() - outputPackages := generator.Packages{} - nonOutputPackages := map[string]struct{}{} - - var packages []string - if len(g.APIMachineryPackages) != 0 { - packages = append(packages, strings.Split(g.APIMachineryPackages, ",")...) - } - if len(g.Packages) != 0 { - packages = append(packages, strings.Split(g.Packages, ",")...) - } - if len(packages) == 0 { - log.Fatalf("Both apimachinery-packages and packages are empty. At least one package must be specified.") - } - - for _, d := range packages { - generateAllTypes, outputPackage := true, true - switch { - case strings.HasPrefix(d, "+"): - d = d[1:] - generateAllTypes = false - case strings.HasPrefix(d, "-"): - d = d[1:] - outputPackage = false - } - name := protoSafePackage(d) - parts := strings.SplitN(d, "=", 2) - if len(parts) > 1 { - d = parts[0] - name = parts[1] - } - p := newProtobufPackage(d, name, generateAllTypes, omitTypes) - header := append([]byte{}, boilerplate...) - header = append(header, p.HeaderText...) - p.HeaderText = header - protobufNames.Add(p) - if outputPackage { - outputPackages = append(outputPackages, p) - } else { - nonOutputPackages[name] = struct{}{} - } - } - - if !g.Common.VerifyOnly { - for _, p := range outputPackages { - if err := p.(*protobufPackage).Clean(g.OutputBase); err != nil { - log.Fatalf("Unable to clean package %s: %v", p.Name(), err) - } - } - } - - if g.Clean { - return - } - - for _, p := range protobufNames.List() { - if err := b.AddDir(p.Path()); err != nil { - log.Fatalf("Unable to add directory %q: %v", p.Path(), err) - } - } - - c, err := generator.NewContext( - b, - namer.NameSystems{ - "public": namer.NewPublicNamer(3), - "proto": protobufNames, - }, - "public", - ) - if err != nil { - log.Fatalf("Failed making a context: %v", err) - } - - c.Verify = g.Common.VerifyOnly - c.FileTypes["protoidl"] = NewProtoFile() - - var vendoredOutputPackages, localOutputPackages generator.Packages - for _, p := range protobufNames.packages { - if _, ok := nonOutputPackages[p.Name()]; ok { - // if we're not outputting the package, don't include it in either package list - continue - } - p.Vendored = strings.Contains(c.Universe[p.PackagePath].SourcePath, "/vendor/") - if p.Vendored { - vendoredOutputPackages = append(vendoredOutputPackages, p) - } else { - localOutputPackages = append(localOutputPackages, p) - } - } - - if err := protobufNames.AssignTypesToPackages(c); err != nil { - log.Fatalf("Failed to identify Common types: %v", err) - } - - if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { - log.Fatalf("Failed executing vendor generator: %v", err) - } - if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { - log.Fatalf("Failed executing local generator: %v", err) - } - - if g.OnlyIDL { - return - } - - if _, err := exec.LookPath("protoc"); err != nil { - log.Fatalf("Unable to find 'protoc': %v", err) - } - - searchArgs := []string{"-I", ".", "-I", g.OutputBase} - if len(g.ProtoImport) != 0 { - for _, s := range g.ProtoImport { - searchArgs = append(searchArgs, "-I", s) - } - } - args := append(searchArgs, fmt.Sprintf("--gogo_out=%s", g.OutputBase)) - - buf := &bytes.Buffer{} - if len(g.Conditional) > 0 { - fmt.Fprintf(buf, "// +build %s\n\n", g.Conditional) - } - buf.Write(boilerplate) - - for _, outputPackage := range outputPackages { - p := outputPackage.(*protobufPackage) - - path := filepath.Join(g.OutputBase, p.ImportPath()) - outputPath := filepath.Join(g.OutputBase, p.OutputPath()) - if p.Vendored { - path = filepath.Join(g.VendorOutputBase, p.ImportPath()) - outputPath = filepath.Join(g.VendorOutputBase, p.OutputPath()) - } - - // generate the gogoprotobuf protoc - cmd := exec.Command("protoc", append(args, path)...) - out, err := cmd.CombinedOutput() - if len(out) > 0 { - log.Printf(string(out)) - } - if err != nil { - log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to generate protoc on %s: %v", p.PackageName, err) - } - - if g.SkipGeneratedRewrite { - continue - } - - // alter the generated protobuf file to remove the generated types (but leave the serializers) and rewrite the - // package statement to match the desired package name - if err := RewriteGeneratedGogoProtobufFile(outputPath, p.ExtractGeneratedType, p.OptionalTypeName, buf.Bytes()); err != nil { - log.Fatalf("Unable to rewrite generated %s: %v", outputPath, err) - } - - // sort imports - cmd = exec.Command("goimports", "-w", outputPath) - out, err = cmd.CombinedOutput() - if len(out) > 0 { - log.Printf(string(out)) - } - if err != nil { - log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to rewrite imports for %s: %v", p.PackageName, err) - } - - // format and simplify the generated file - cmd = exec.Command("gofmt", "-s", "-w", outputPath) - out, err = cmd.CombinedOutput() - if len(out) > 0 { - log.Printf(string(out)) - } - if err != nil { - log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to apply gofmt for %s: %v", p.PackageName, err) - } - } - - if g.SkipGeneratedRewrite { - return - } - - if !g.KeepGogoproto { - // generate, but do so without gogoprotobuf extensions - for _, outputPackage := range outputPackages { - p := outputPackage.(*protobufPackage) - p.OmitGogo = true - } - if err := c.ExecutePackages(g.VendorOutputBase, vendoredOutputPackages); err != nil { - log.Fatalf("Failed executing vendor generator: %v", err) - } - if err := c.ExecutePackages(g.OutputBase, localOutputPackages); err != nil { - log.Fatalf("Failed executing local generator: %v", err) - } - } - - for _, outputPackage := range outputPackages { - p := outputPackage.(*protobufPackage) - - if len(p.StructTags) == 0 { - continue - } - - pattern := filepath.Join(g.OutputBase, p.PackagePath, "*.go") - if p.Vendored { - pattern = filepath.Join(g.VendorOutputBase, p.PackagePath, "*.go") - } - files, err := filepath.Glob(pattern) - if err != nil { - log.Fatalf("Can't glob pattern %q: %v", pattern, err) - } - - for _, s := range files { - if strings.HasSuffix(s, "_test.go") { - continue - } - if err := RewriteTypesWithProtobufStructTags(s, p.StructTags); err != nil { - log.Fatalf("Unable to rewrite with struct tags %s: %v", s, err) - } - } - } -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go deleted file mode 100644 index 0e7a7d8ec3..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/generator.go +++ /dev/null @@ -1,769 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -package protobuf - -import ( - "fmt" - "io" - "log" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/golang/glog" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -// genProtoIDL produces a .proto IDL. -type genProtoIDL struct { - generator.DefaultGen - localPackage types.Name - localGoPackage types.Name - imports namer.ImportTracker - - generateAll bool - omitGogo bool - omitFieldTypes map[types.Name]struct{} -} - -func (g *genProtoIDL) PackageVars(c *generator.Context) []string { - if g.omitGogo { - return []string{ - fmt.Sprintf("option go_package = %q;", g.localGoPackage.Name), - } - } - return []string{ - "option (gogoproto.marshaler_all) = true;", - "option (gogoproto.stable_marshaler_all) = true;", - "option (gogoproto.sizer_all) = true;", - "option (gogoproto.goproto_stringer_all) = false;", - "option (gogoproto.stringer_all) = true;", - "option (gogoproto.unmarshaler_all) = true;", - "option (gogoproto.goproto_unrecognized_all) = false;", - "option (gogoproto.goproto_enum_prefix_all) = false;", - "option (gogoproto.goproto_getters_all) = false;", - fmt.Sprintf("option go_package = %q;", g.localGoPackage.Name), - } -} -func (g *genProtoIDL) Filename() string { return g.OptionalName + ".proto" } -func (g *genProtoIDL) FileType() string { return "protoidl" } -func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems { - return namer.NameSystems{ - // The local namer returns the correct protobuf name for a proto type - // in the context of a package - "local": localNamer{g.localPackage}, - } -} - -// Filter ignores types that are identified as not exportable. -func (g *genProtoIDL) Filter(c *generator.Context, t *types.Type) bool { - tagVals := types.ExtractCommentTags("+", t.CommentLines)["protobuf"] - if tagVals != nil { - if tagVals[0] == "false" { - // Type specified "false". - return false - } - if tagVals[0] == "true" { - // Type specified "true". - return true - } - glog.Fatalf(`Comment tag "protobuf" must be true or false, found: %q`, tagVals[0]) - } - if !g.generateAll { - // We're not generating everything. - return false - } - seen := map[*types.Type]bool{} - ok := isProtoable(seen, t) - return ok -} - -func isProtoable(seen map[*types.Type]bool, t *types.Type) bool { - if seen[t] { - // be optimistic in the case of type cycles. - return true - } - seen[t] = true - switch t.Kind { - case types.Builtin: - return true - case types.Alias: - return isProtoable(seen, t.Underlying) - case types.Slice, types.Pointer: - return isProtoable(seen, t.Elem) - case types.Map: - return isProtoable(seen, t.Key) && isProtoable(seen, t.Elem) - case types.Struct: - if len(t.Members) == 0 { - return true - } - for _, m := range t.Members { - if isProtoable(seen, m.Type) { - return true - } - } - return false - case types.Func, types.Chan: - return false - case types.DeclarationOf, types.Unknown, types.Unsupported: - return false - case types.Interface: - return false - default: - log.Printf("WARNING: type %q is not portable: %s", t.Kind, t.Name) - return false - } -} - -// isOptionalAlias should return true if the specified type has an underlying type -// (is an alias) of a map or slice and has the comment tag protobuf.nullable=true, -// indicating that the type should be nullable in protobuf. -func isOptionalAlias(t *types.Type) bool { - if t.Underlying == nil || (t.Underlying.Kind != types.Map && t.Underlying.Kind != types.Slice) { - return false - } - if extractBoolTagOrDie("protobuf.nullable", t.CommentLines) == false { - return false - } - return true -} - -func (g *genProtoIDL) Imports(c *generator.Context) (imports []string) { - lines := []string{} - // TODO: this could be expressed more cleanly - for _, line := range g.imports.ImportLines() { - if g.omitGogo && line == "github.com/gogo/protobuf/gogoproto/gogo.proto" { - continue - } - lines = append(lines, line) - } - return lines -} - -// GenerateType makes the body of a file implementing a set for type t. -func (g *genProtoIDL) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - b := bodyGen{ - locator: &protobufLocator{ - namer: c.Namers["proto"].(ProtobufFromGoNamer), - tracker: g.imports, - universe: c.Universe, - - localGoPackage: g.localGoPackage.Package, - }, - localPackage: g.localPackage, - - omitGogo: g.omitGogo, - omitFieldTypes: g.omitFieldTypes, - - t: t, - } - switch t.Kind { - case types.Alias: - return b.doAlias(sw) - case types.Struct: - return b.doStruct(sw) - default: - return b.unknown(sw) - } -} - -// ProtobufFromGoNamer finds the protobuf name of a type (and its package, and -// the package path) from its Go name. -type ProtobufFromGoNamer interface { - GoNameToProtoName(name types.Name) types.Name -} - -type ProtobufLocator interface { - ProtoTypeFor(t *types.Type) (*types.Type, error) - GoTypeForName(name types.Name) *types.Type - CastTypeName(name types.Name) string -} - -type protobufLocator struct { - namer ProtobufFromGoNamer - tracker namer.ImportTracker - universe types.Universe - - localGoPackage string -} - -// CastTypeName returns the cast type name of a Go type -// TODO: delegate to a new localgo namer? -func (p protobufLocator) CastTypeName(name types.Name) string { - if name.Package == p.localGoPackage { - return name.Name - } - return name.String() -} - -func (p protobufLocator) GoTypeForName(name types.Name) *types.Type { - if len(name.Package) == 0 { - name.Package = p.localGoPackage - } - return p.universe.Type(name) -} - -// ProtoTypeFor locates a Protobuf type for the provided Go type (if possible). -func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) { - switch { - // we've already converted the type, or it's a map - case t.Kind == types.Protobuf || t.Kind == types.Map: - p.tracker.AddType(t) - return t, nil - } - // it's a fundamental type - if t, ok := isFundamentalProtoType(t); ok { - p.tracker.AddType(t) - return t, nil - } - // it's a message - if t.Kind == types.Struct || isOptionalAlias(t) { - t := &types.Type{ - Name: p.namer.GoNameToProtoName(t.Name), - Kind: types.Protobuf, - - CommentLines: t.CommentLines, - } - p.tracker.AddType(t) - return t, nil - } - return nil, errUnrecognizedType -} - -type bodyGen struct { - locator ProtobufLocator - localPackage types.Name - omitGogo bool - omitFieldTypes map[types.Name]struct{} - - t *types.Type -} - -func (b bodyGen) unknown(sw *generator.SnippetWriter) error { - return fmt.Errorf("not sure how to generate: %#v", b.t) -} - -func (b bodyGen) doAlias(sw *generator.SnippetWriter) error { - if !isOptionalAlias(b.t) { - return nil - } - - var kind string - switch b.t.Underlying.Kind { - case types.Map: - kind = "map" - default: - kind = "slice" - } - optional := &types.Type{ - Name: b.t.Name, - Kind: types.Struct, - - CommentLines: b.t.CommentLines, - SecondClosestCommentLines: b.t.SecondClosestCommentLines, - Members: []types.Member{ - { - Name: "Items", - CommentLines: []string{fmt.Sprintf("items, if empty, will result in an empty %s\n", kind)}, - Type: b.t.Underlying, - }, - }, - } - nested := b - nested.t = optional - return nested.doStruct(sw) -} - -func (b bodyGen) doStruct(sw *generator.SnippetWriter) error { - if len(b.t.Name.Name) == 0 { - return nil - } - if namer.IsPrivateGoName(b.t.Name.Name) { - return nil - } - - var alias *types.Type - var fields []protoField - options := []string{} - allOptions := types.ExtractCommentTags("+", b.t.CommentLines) - for k, v := range allOptions { - switch { - case strings.HasPrefix(k, "protobuf.options."): - key := strings.TrimPrefix(k, "protobuf.options.") - switch key { - case "marshal": - if v[0] == "false" { - if !b.omitGogo { - options = append(options, - "(gogoproto.marshaler) = false", - "(gogoproto.unmarshaler) = false", - "(gogoproto.sizer) = false", - ) - } - } - default: - if !b.omitGogo || !strings.HasPrefix(key, "(gogoproto.") { - if key == "(gogoproto.goproto_stringer)" && v[0] == "false" { - options = append(options, "(gogoproto.stringer) = false") - } - options = append(options, fmt.Sprintf("%s = %s", key, v[0])) - } - } - // protobuf.as allows a type to have the same message contents as another Go type - case k == "protobuf.as": - fields = nil - if alias = b.locator.GoTypeForName(types.Name{Name: v[0]}); alias == nil { - return fmt.Errorf("type %v references alias %q which does not exist", b.t, v[0]) - } - // protobuf.embed instructs the generator to use the named type in this package - // as an embedded message. - case k == "protobuf.embed": - fields = []protoField{ - { - Tag: 1, - Name: v[0], - Type: &types.Type{ - Name: types.Name{ - Name: v[0], - Package: b.localPackage.Package, - Path: b.localPackage.Path, - }, - }, - }, - } - } - } - if alias == nil { - alias = b.t - } - - // If we don't explicitly embed anything, generate fields by traversing fields. - if fields == nil { - memberFields, err := membersToFields(b.locator, alias, b.localPackage, b.omitFieldTypes) - if err != nil { - return fmt.Errorf("type %v cannot be converted to protobuf: %v", b.t, err) - } - fields = memberFields - } - - out := sw.Out() - genComment(out, b.t.CommentLines, "") - sw.Do(`message $.Name.Name$ { -`, b.t) - - if len(options) > 0 { - sort.Sort(sort.StringSlice(options)) - for _, s := range options { - fmt.Fprintf(out, " option %s;\n", s) - } - fmt.Fprintln(out) - } - - for i, field := range fields { - genComment(out, field.CommentLines, " ") - fmt.Fprintf(out, " ") - switch { - case field.Map: - case field.Repeated: - fmt.Fprintf(out, "repeated ") - case field.Required: - fmt.Fprintf(out, "required ") - default: - fmt.Fprintf(out, "optional ") - } - sw.Do(`$.Type|local$ $.Name$ = $.Tag$`, field) - if len(field.Extras) > 0 { - extras := []string{} - for k, v := range field.Extras { - if b.omitGogo && strings.HasPrefix(k, "(gogoproto.") { - continue - } - extras = append(extras, fmt.Sprintf("%s = %s", k, v)) - } - sort.Sort(sort.StringSlice(extras)) - if len(extras) > 0 { - fmt.Fprintf(out, " [") - fmt.Fprint(out, strings.Join(extras, ", ")) - fmt.Fprintf(out, "]") - } - } - fmt.Fprintf(out, ";\n") - if i != len(fields)-1 { - fmt.Fprintf(out, "\n") - } - } - fmt.Fprintf(out, "}\n\n") - return nil -} - -type protoField struct { - LocalPackage types.Name - - Tag int - Name string - Type *types.Type - Map bool - Repeated bool - Optional bool - Required bool - Nullable bool - Extras map[string]string - - CommentLines []string -} - -var ( - errUnrecognizedType = fmt.Errorf("did not recognize the provided type") -) - -func isFundamentalProtoType(t *types.Type) (*types.Type, bool) { - // TODO: when we enable proto3, also include other fundamental types in the google.protobuf package - // switch { - // case t.Kind == types.Struct && t.Name == types.Name{Package: "time", Name: "Time"}: - // return &types.Type{ - // Kind: types.Protobuf, - // Name: types.Name{Path: "google/protobuf/timestamp.proto", Package: "google.protobuf", Name: "Timestamp"}, - // }, true - // } - switch t.Kind { - case types.Slice: - if t.Elem.Name.Name == "byte" && len(t.Elem.Name.Package) == 0 { - return &types.Type{Name: types.Name{Name: "bytes"}, Kind: types.Protobuf}, true - } - case types.Builtin: - switch t.Name.Name { - case "string", "uint32", "int32", "uint64", "int64", "bool": - return &types.Type{Name: types.Name{Name: t.Name.Name}, Kind: types.Protobuf}, true - case "int": - return &types.Type{Name: types.Name{Name: "int64"}, Kind: types.Protobuf}, true - case "uint": - return &types.Type{Name: types.Name{Name: "uint64"}, Kind: types.Protobuf}, true - case "float64", "float": - return &types.Type{Name: types.Name{Name: "double"}, Kind: types.Protobuf}, true - case "float32": - return &types.Type{Name: types.Name{Name: "float"}, Kind: types.Protobuf}, true - case "uintptr": - return &types.Type{Name: types.Name{Name: "uint64"}, Kind: types.Protobuf}, true - } - // TODO: complex? - } - return t, false -} - -func memberTypeToProtobufField(locator ProtobufLocator, field *protoField, t *types.Type) error { - var err error - switch t.Kind { - case types.Protobuf: - field.Type, err = locator.ProtoTypeFor(t) - case types.Builtin: - field.Type, err = locator.ProtoTypeFor(t) - case types.Map: - valueField := &protoField{} - if err := memberTypeToProtobufField(locator, valueField, t.Elem); err != nil { - return err - } - keyField := &protoField{} - if err := memberTypeToProtobufField(locator, keyField, t.Key); err != nil { - return err - } - // All other protobuf types have kind types.Protobuf, so setting types.Map - // here would be very misleading. - field.Type = &types.Type{ - Kind: types.Protobuf, - Key: keyField.Type, - Elem: valueField.Type, - } - if !strings.HasPrefix(t.Name.Name, "map[") { - field.Extras["(gogoproto.casttype)"] = strconv.Quote(locator.CastTypeName(t.Name)) - } - if k, ok := keyField.Extras["(gogoproto.casttype)"]; ok { - field.Extras["(gogoproto.castkey)"] = k - } - if v, ok := valueField.Extras["(gogoproto.casttype)"]; ok { - field.Extras["(gogoproto.castvalue)"] = v - } - field.Map = true - case types.Pointer: - if err := memberTypeToProtobufField(locator, field, t.Elem); err != nil { - return err - } - field.Nullable = true - case types.Alias: - if isOptionalAlias(t) { - field.Type, err = locator.ProtoTypeFor(t) - field.Nullable = true - } else { - if err := memberTypeToProtobufField(locator, field, t.Underlying); err != nil { - log.Printf("failed to alias: %s %s: err %v", t.Name, t.Underlying.Name, err) - return err - } - // If this is not an alias to a slice, cast to the alias - if !field.Repeated { - if field.Extras == nil { - field.Extras = make(map[string]string) - } - field.Extras["(gogoproto.casttype)"] = strconv.Quote(locator.CastTypeName(t.Name)) - } - } - case types.Slice: - if t.Elem.Name.Name == "byte" && len(t.Elem.Name.Package) == 0 { - field.Type = &types.Type{Name: types.Name{Name: "bytes"}, Kind: types.Protobuf} - return nil - } - if err := memberTypeToProtobufField(locator, field, t.Elem); err != nil { - return err - } - field.Repeated = true - case types.Struct: - if len(t.Name.Name) == 0 { - return errUnrecognizedType - } - field.Type, err = locator.ProtoTypeFor(t) - field.Nullable = false - default: - return errUnrecognizedType - } - return err -} - -// protobufTagToField extracts information from an existing protobuf tag -func protobufTagToField(tag string, field *protoField, m types.Member, t *types.Type, localPackage types.Name) error { - if len(tag) == 0 || tag == "-" { - return nil - } - - // protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" - parts := strings.Split(tag, ",") - if len(parts) < 3 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, not enough segments\n", m.Name, t.Name) - } - protoTag, err := strconv.Atoi(parts[1]) - if err != nil { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, field ID is %q which is not an integer: %v\n", m.Name, t.Name, parts[1], err) - } - field.Tag = protoTag - - // In general there is doesn't make sense to parse the protobuf tags to get the type, - // as all auto-generated once will have wire type "bytes", "varint" or "fixed64". - // However, sometimes we explicitly set them to have a custom serialization, e.g.: - // type Time struct { - // time.Time `protobuf:"Timestamp,1,req,name=time"` - // } - // to force the generator to use a given type (that we manually wrote serialization & - // deserialization methods for). - switch parts[0] { - case "varint", "fixed32", "fixed64", "bytes", "group": - default: - name := types.Name{} - if last := strings.LastIndex(parts[0], "."); last != -1 { - prefix := parts[0][:last] - name = types.Name{ - Name: parts[0][last+1:], - Package: prefix, - Path: strings.Replace(prefix, ".", "/", -1), - } - } else { - name = types.Name{ - Name: parts[0], - Package: localPackage.Package, - Path: localPackage.Path, - } - } - field.Type = &types.Type{ - Name: name, - Kind: types.Protobuf, - } - } - - protoExtra := make(map[string]string) - for i, extra := range parts[3:] { - parts := strings.SplitN(extra, "=", 2) - if len(parts) != 2 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q\n", m.Name, t.Name, i+4, extra) - } - switch parts[0] { - case "name": - protoExtra[parts[0]] = parts[1] - case "casttype", "castkey", "castvalue": - parts[0] = fmt.Sprintf("(gogoproto.%s)", parts[0]) - protoExtra[parts[0]] = strconv.Quote(parts[1]) - } - } - - field.Extras = protoExtra - if name, ok := protoExtra["name"]; ok { - field.Name = name - delete(protoExtra, "name") - } - - return nil -} - -func membersToFields(locator ProtobufLocator, t *types.Type, localPackage types.Name, omitFieldTypes map[types.Name]struct{}) ([]protoField, error) { - fields := []protoField{} - - for _, m := range t.Members { - if namer.IsPrivateGoName(m.Name) { - // skip private fields - continue - } - if _, ok := omitFieldTypes[types.Name{Name: m.Type.Name.Name, Package: m.Type.Name.Package}]; ok { - continue - } - tags := reflect.StructTag(m.Tags) - field := protoField{ - LocalPackage: localPackage, - - Tag: -1, - Extras: make(map[string]string), - } - - protobufTag := tags.Get("protobuf") - if protobufTag == "-" { - continue - } - - if err := protobufTagToField(protobufTag, &field, m, t, localPackage); err != nil { - return nil, err - } - - // extract information from JSON field tag - if tag := tags.Get("json"); len(tag) > 0 { - parts := strings.Split(tag, ",") - if len(field.Name) == 0 && len(parts[0]) != 0 { - field.Name = parts[0] - } - if field.Tag == -1 && field.Name == "-" { - continue - } - } - - if field.Type == nil { - if err := memberTypeToProtobufField(locator, &field, m.Type); err != nil { - return nil, fmt.Errorf("unable to embed type %q as field %q in %q: %v", m.Type, field.Name, t.Name, err) - } - } - if len(field.Name) == 0 { - field.Name = namer.IL(m.Name) - } - - if field.Map && field.Repeated { - // maps cannot be repeated - field.Repeated = false - field.Nullable = true - } - - if !field.Nullable { - field.Extras["(gogoproto.nullable)"] = "false" - } - if (field.Type.Name.Name == "bytes" && field.Type.Name.Package == "") || (field.Repeated && field.Type.Name.Package == "" && namer.IsPrivateGoName(field.Type.Name.Name)) { - delete(field.Extras, "(gogoproto.nullable)") - } - if field.Name != m.Name { - field.Extras["(gogoproto.customname)"] = strconv.Quote(m.Name) - } - field.CommentLines = m.CommentLines - fields = append(fields, field) - } - - // assign tags - highest := 0 - byTag := make(map[int]*protoField) - // fields are in Go struct order, which we preserve - for i := range fields { - field := &fields[i] - tag := field.Tag - if tag != -1 { - if existing, ok := byTag[tag]; ok { - return nil, fmt.Errorf("field %q and %q both have tag %d", field.Name, existing.Name, tag) - } - byTag[tag] = field - } - if tag > highest { - highest = tag - } - } - // starting from the highest observed tag, assign new field tags - for i := range fields { - field := &fields[i] - if field.Tag != -1 { - continue - } - highest++ - field.Tag = highest - byTag[field.Tag] = field - } - return fields, nil -} - -func genComment(out io.Writer, lines []string, indent string) { - for { - l := len(lines) - if l == 0 || len(lines[l-1]) != 0 { - break - } - lines = lines[:l-1] - } - for _, c := range lines { - fmt.Fprintf(out, "%s// %s\n", indent, c) - } -} - -func formatProtoFile(source []byte) ([]byte, error) { - // TODO; Is there any protobuf formatter? - return source, nil -} - -func assembleProtoFile(w io.Writer, f *generator.File) { - w.Write(f.Header) - - fmt.Fprint(w, "syntax = 'proto2';\n\n") - - if len(f.PackageName) > 0 { - fmt.Fprintf(w, "package %s;\n\n", f.PackageName) - } - - if len(f.Imports) > 0 { - imports := []string{} - for i := range f.Imports { - imports = append(imports, i) - } - sort.Strings(imports) - for _, s := range imports { - fmt.Fprintf(w, "import %q;\n", s) - } - fmt.Fprint(w, "\n") - } - - if f.Vars.Len() > 0 { - fmt.Fprintf(w, "%s\n", f.Vars.String()) - } - - w.Write(f.Body.Bytes()) -} - -func NewProtoFile() *generator.DefaultFileType { - return &generator.DefaultFileType{ - Format: formatProtoFile, - Assemble: assembleProtoFile, - } -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go deleted file mode 100644 index 08a991b155..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/import_tracker.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -package protobuf - -import ( - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -type ImportTracker struct { - namer.DefaultImportTracker -} - -func NewImportTracker(local types.Name, typesToAdd ...*types.Type) *ImportTracker { - tracker := namer.NewDefaultImportTracker(local) - tracker.IsInvalidType = func(t *types.Type) bool { return t.Kind != types.Protobuf } - tracker.LocalName = func(name types.Name) string { return name.Package } - tracker.PrintImport = func(path, name string) string { return path } - - tracker.AddTypes(typesToAdd...) - return &ImportTracker{ - DefaultImportTracker: tracker, - } -} - -// AddNullable ensures that support for the nullable Gogo-protobuf extension is added. -func (tracker *ImportTracker) AddNullable() { - tracker.AddType(&types.Type{ - Kind: types.Protobuf, - Name: types.Name{ - Name: "nullable", - Package: "gogoproto", - Path: "github.com/gogo/protobuf/gogoproto/gogo.proto", - }, - }) -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go deleted file mode 100644 index 423577a12e..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -package protobuf - -import ( - "fmt" - "reflect" - "strings" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -type localNamer struct { - localPackage types.Name -} - -func (n localNamer) Name(t *types.Type) string { - if t.Key != nil && t.Elem != nil { - return fmt.Sprintf("map<%s, %s>", n.Name(t.Key), n.Name(t.Elem)) - } - if len(n.localPackage.Package) != 0 && n.localPackage.Package == t.Name.Package { - return t.Name.Name - } - return t.Name.String() -} - -type protobufNamer struct { - packages []*protobufPackage - packagesByPath map[string]*protobufPackage -} - -func NewProtobufNamer() *protobufNamer { - return &protobufNamer{ - packagesByPath: make(map[string]*protobufPackage), - } -} - -func (n *protobufNamer) Name(t *types.Type) string { - if t.Kind == types.Map { - return fmt.Sprintf("map<%s, %s>", n.Name(t.Key), n.Name(t.Elem)) - } - return t.Name.String() -} - -func (n *protobufNamer) List() []generator.Package { - packages := make([]generator.Package, 0, len(n.packages)) - for i := range n.packages { - packages = append(packages, n.packages[i]) - } - return packages -} - -func (n *protobufNamer) Add(p *protobufPackage) { - if _, ok := n.packagesByPath[p.PackagePath]; !ok { - n.packagesByPath[p.PackagePath] = p - n.packages = append(n.packages, p) - } -} - -func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { - if p, ok := n.packagesByPath[name.Package]; ok { - return types.Name{ - Name: name.Name, - Package: p.PackageName, - Path: p.ImportPath(), - } - } - for _, p := range n.packages { - if _, ok := p.FilterTypes[name]; ok { - return types.Name{ - Name: name.Name, - Package: p.PackageName, - Path: p.ImportPath(), - } - } - } - return types.Name{Name: name.Name} -} - -func protoSafePackage(name string) string { - pkg := strings.Replace(name, "/", ".", -1) - return strings.Replace(pkg, "-", "_", -1) -} - -type typeNameSet map[types.Name]*protobufPackage - -// assignGoTypeToProtoPackage looks for Go and Protobuf types that are referenced by a type in -// a package. It will not recurse into protobuf types. -func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global typeNameSet, optional map[types.Name]struct{}) { - newT, isProto := isFundamentalProtoType(t) - if isProto { - t = newT - } - if otherP, ok := global[t.Name]; ok { - if _, ok := local[t.Name]; !ok { - p.Imports.AddType(&types.Type{ - Kind: types.Protobuf, - Name: otherP.ProtoTypeName(), - }) - } - return - } - global[t.Name] = p - if _, ok := local[t.Name]; ok { - return - } - // don't recurse into existing proto types - if isProto { - p.Imports.AddType(t) - return - } - - local[t.Name] = p - for _, m := range t.Members { - if namer.IsPrivateGoName(m.Name) { - continue - } - field := &protoField{} - tag := reflect.StructTag(m.Tags).Get("protobuf") - if tag == "-" { - continue - } - if err := protobufTagToField(tag, field, m, t, p.ProtoTypeName()); err == nil && field.Type != nil { - assignGoTypeToProtoPackage(p, field.Type, local, global, optional) - continue - } - assignGoTypeToProtoPackage(p, m.Type, local, global, optional) - } - // TODO: should methods be walked? - if t.Elem != nil { - assignGoTypeToProtoPackage(p, t.Elem, local, global, optional) - } - if t.Key != nil { - assignGoTypeToProtoPackage(p, t.Key, local, global, optional) - } - if t.Underlying != nil { - if t.Kind == types.Alias && isOptionalAlias(t) { - optional[t.Name] = struct{}{} - } - assignGoTypeToProtoPackage(p, t.Underlying, local, global, optional) - } -} - -// isTypeApplicableToProtobuf checks to see if a type is relevant for protobuf processing. -// Currently, it filters out functions and private types. -func isTypeApplicableToProtobuf(t *types.Type) bool { - // skip functions -- we don't care about them for protobuf - if t.Kind == types.Func || (t.Kind == types.DeclarationOf && t.Underlying.Kind == types.Func) { - return false - } - // skip private types - if namer.IsPrivateGoName(t.Name.Name) { - return false - } - - return true -} - -func (n *protobufNamer) AssignTypesToPackages(c *generator.Context) error { - global := make(typeNameSet) - for _, p := range n.packages { - local := make(typeNameSet) - optional := make(map[types.Name]struct{}) - p.Imports = NewImportTracker(p.ProtoTypeName()) - for _, t := range c.Order { - if t.Name.Package != p.PackagePath { - continue - } - if !isTypeApplicableToProtobuf(t) { - // skip types that we don't care about, like functions - continue - } - assignGoTypeToProtoPackage(p, t, local, global, optional) - } - p.FilterTypes = make(map[types.Name]struct{}) - p.LocalNames = make(map[string]struct{}) - p.OptionalTypeNames = make(map[string]struct{}) - for k, v := range local { - if v == p { - p.FilterTypes[k] = struct{}{} - p.LocalNames[k.Name] = struct{}{} - if _, ok := optional[k]; ok { - p.OptionalTypeNames[k.Name] = struct{}{} - } - } - } - } - return nil -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go deleted file mode 100644 index bed4c3e306..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/package.go +++ /dev/null @@ -1,215 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -package protobuf - -import ( - "fmt" - "go/ast" - "log" - "os" - "path/filepath" - "reflect" - "strings" - - "k8s.io/gengo/generator" - "k8s.io/gengo/types" -) - -func newProtobufPackage(packagePath, packageName string, generateAll bool, omitFieldTypes map[types.Name]struct{}) *protobufPackage { - pkg := &protobufPackage{ - DefaultPackage: generator.DefaultPackage{ - // The protobuf package name (foo.bar.baz) - PackageName: packageName, - // A path segment relative to the GOPATH root (foo/bar/baz) - PackagePath: packagePath, - HeaderText: []byte( - ` -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -`), - PackageDocumentation: []byte(fmt.Sprintf( - `// Package %s is an autogenerated protobuf IDL. -`, packageName)), - }, - GenerateAll: generateAll, - OmitFieldTypes: omitFieldTypes, - } - pkg.FilterFunc = pkg.filterFunc - pkg.GeneratorFunc = pkg.generatorFunc - return pkg -} - -// protobufPackage contains the protobuf implementation of Package. -type protobufPackage struct { - generator.DefaultPackage - - // If true, this package has been vendored into our source tree and thus can - // only be generated by changing the vendor tree. - Vendored bool - - // If true, generate protobuf serializations for all public types. - // If false, only generate protobuf serializations for structs that - // request serialization. - GenerateAll bool - - // A list of types to filter to; if not specified all types will be included. - FilterTypes map[types.Name]struct{} - - // If true, omit any gogoprotobuf extensions not defined as types. - OmitGogo bool - - // A list of field types that will be excluded from the output struct - OmitFieldTypes map[types.Name]struct{} - - // A list of names that this package exports - LocalNames map[string]struct{} - - // A list of type names in this package that will need marshaller rewriting - // to remove synthetic protobuf fields. - OptionalTypeNames map[string]struct{} - - // A list of struct tags to generate onto named struct fields - StructTags map[string]map[string]string - - // An import tracker for this package - Imports *ImportTracker -} - -func (p *protobufPackage) Clean(outputBase string) error { - for _, s := range []string{p.ImportPath(), p.OutputPath()} { - if err := os.Remove(filepath.Join(outputBase, s)); err != nil && !os.IsNotExist(err) { - return err - } - } - return nil -} - -func (p *protobufPackage) ProtoTypeName() types.Name { - return types.Name{ - Name: p.Path(), // the go path "foo/bar/baz" - Package: p.Name(), // the protobuf package "foo.bar.baz" - Path: p.ImportPath(), // the path of the import to get the proto - } -} - -func (p *protobufPackage) filterFunc(c *generator.Context, t *types.Type) bool { - switch t.Kind { - case types.Func, types.Chan: - return false - case types.Struct: - if t.Name.Name == "struct{}" { - return false - } - case types.Builtin: - return false - case types.Alias: - if !isOptionalAlias(t) { - return false - } - case types.Slice, types.Array, types.Map: - return false - case types.Pointer: - return false - } - if _, ok := isFundamentalProtoType(t); ok { - return false - } - _, ok := p.FilterTypes[t.Name] - return ok -} - -func (p *protobufPackage) HasGoType(name string) bool { - _, ok := p.LocalNames[name] - return ok -} - -func (p *protobufPackage) OptionalTypeName(name string) bool { - _, ok := p.OptionalTypeNames[name] - return ok -} - -func (p *protobufPackage) ExtractGeneratedType(t *ast.TypeSpec) bool { - if !p.HasGoType(t.Name.Name) { - return false - } - - switch s := t.Type.(type) { - case *ast.StructType: - for i, f := range s.Fields.List { - if len(f.Tag.Value) == 0 { - continue - } - tag := strings.Trim(f.Tag.Value, "`") - protobufTag := reflect.StructTag(tag).Get("protobuf") - if len(protobufTag) == 0 { - continue - } - if len(f.Names) > 1 { - log.Printf("WARNING: struct %s field %d %s: defined multiple names but single protobuf tag", t.Name.Name, i, f.Names[0].Name) - // TODO hard error? - } - if p.StructTags == nil { - p.StructTags = make(map[string]map[string]string) - } - m := p.StructTags[t.Name.Name] - if m == nil { - m = make(map[string]string) - p.StructTags[t.Name.Name] = m - } - m[f.Names[0].Name] = tag - } - default: - log.Printf("WARNING: unexpected Go AST type definition: %#v", t) - } - - return true -} - -func (p *protobufPackage) generatorFunc(c *generator.Context) []generator.Generator { - generators := []generator.Generator{} - - p.Imports.AddNullable() - - generators = append(generators, &genProtoIDL{ - DefaultGen: generator.DefaultGen{ - OptionalName: "generated", - }, - localPackage: types.Name{Package: p.PackageName, Path: p.PackagePath}, - localGoPackage: types.Name{Package: p.PackagePath, Name: p.GoPackageName()}, - imports: p.Imports, - generateAll: p.GenerateAll, - omitGogo: p.OmitGogo, - omitFieldTypes: p.OmitFieldTypes, - }) - return generators -} - -func (p *protobufPackage) GoPackageName() string { - return filepath.Base(p.PackagePath) -} - -func (p *protobufPackage) ImportPath() string { - return filepath.Join(p.PackagePath, "generated.proto") -} - -func (p *protobufPackage) OutputPath() string { - return filepath.Join(p.PackagePath, "generated.pb.go") -} - -var ( - _ = generator.Package(&protobufPackage{}) -) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go deleted file mode 100644 index 305b718edb..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/parser.go +++ /dev/null @@ -1,452 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -package protobuf - -import ( - "bytes" - "errors" - "fmt" - "go/ast" - "go/format" - "go/parser" - "go/printer" - "go/token" - "io/ioutil" - "os" - "reflect" - "strings" - - customreflect "k8s.io/code-generator/third_party/forked/golang/reflect" -) - -func rewriteFile(name string, header []byte, rewriteFn func(*token.FileSet, *ast.File) error) error { - fset := token.NewFileSet() - src, err := ioutil.ReadFile(name) - if err != nil { - return err - } - file, err := parser.ParseFile(fset, name, src, parser.DeclarationErrors|parser.ParseComments) - if err != nil { - return err - } - - if err := rewriteFn(fset, file); err != nil { - return err - } - - b := &bytes.Buffer{} - b.Write(header) - if err := printer.Fprint(b, fset, file); err != nil { - return err - } - - body, err := format.Source(b.Bytes()) - if err != nil { - return err - } - - f, err := os.OpenFile(name, os.O_WRONLY|os.O_TRUNC, 0644) - if err != nil { - return err - } - defer f.Close() - if _, err := f.Write(body); err != nil { - return err - } - return f.Close() -} - -// ExtractFunc extracts information from the provided TypeSpec and returns true if the type should be -// removed from the destination file. -type ExtractFunc func(*ast.TypeSpec) bool - -// OptionalFunc returns true if the provided local name is a type that has protobuf.nullable=true -// and should have its marshal functions adjusted to remove the 'Items' accessor. -type OptionalFunc func(name string) bool - -func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, optionalFn OptionalFunc, header []byte) error { - return rewriteFile(name, header, func(fset *token.FileSet, file *ast.File) error { - cmap := ast.NewCommentMap(fset, file, file.Comments) - - // transform methods that point to optional maps or slices - for _, d := range file.Decls { - rewriteOptionalMethods(d, optionalFn) - } - - // remove types that are already declared - decls := []ast.Decl{} - for _, d := range file.Decls { - if dropExistingTypeDeclarations(d, extractFn) { - continue - } - if dropEmptyImportDeclarations(d) { - continue - } - decls = append(decls, d) - } - file.Decls = decls - - // remove unmapped comments - file.Comments = cmap.Filter(file).Comments() - return nil - }) -} - -// rewriteOptionalMethods makes specific mutations to marshaller methods that belong to types identified -// as being "optional" (they may be nil on the wire). This allows protobuf to serialize a map or slice and -// properly discriminate between empty and nil (which is not possible in protobuf). -// TODO: move into upstream gogo-protobuf once https://github.com/gogo/protobuf/issues/181 -// has agreement -func rewriteOptionalMethods(decl ast.Decl, isOptional OptionalFunc) { - switch t := decl.(type) { - case *ast.FuncDecl: - ident, ptr, ok := receiver(t) - if !ok { - return - } - - // correct initialization of the form `m.Field = &OptionalType{}` to - // `m.Field = OptionalType{}` - if t.Name.Name == "Unmarshal" { - ast.Walk(optionalAssignmentVisitor{fn: isOptional}, t.Body) - } - - if !isOptional(ident.Name) { - return - } - - switch t.Name.Name { - case "Unmarshal": - ast.Walk(&optionalItemsVisitor{}, t.Body) - case "MarshalTo", "Size", "String": - ast.Walk(&optionalItemsVisitor{}, t.Body) - fallthrough - case "Marshal": - // if the method has a pointer receiver, set it back to a normal receiver - if ptr { - t.Recv.List[0].Type = ident - } - } - } -} - -type optionalAssignmentVisitor struct { - fn OptionalFunc -} - -// Visit walks the provided node, transforming field initializations of the form -// m.Field = &OptionalType{} -> m.Field = OptionalType{} -func (v optionalAssignmentVisitor) Visit(n ast.Node) ast.Visitor { - switch t := n.(type) { - case *ast.AssignStmt: - if len(t.Lhs) == 1 && len(t.Rhs) == 1 { - if !isFieldSelector(t.Lhs[0], "m", "") { - return nil - } - unary, ok := t.Rhs[0].(*ast.UnaryExpr) - if !ok || unary.Op != token.AND { - return nil - } - composite, ok := unary.X.(*ast.CompositeLit) - if !ok || composite.Type == nil || len(composite.Elts) != 0 { - return nil - } - if ident, ok := composite.Type.(*ast.Ident); ok && v.fn(ident.Name) { - t.Rhs[0] = composite - } - } - return nil - } - return v -} - -type optionalItemsVisitor struct{} - -// Visit walks the provided node, looking for specific patterns to transform that match -// the effective outcome of turning struct{ map[x]y || []x } into map[x]y or []x. -func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { - switch t := n.(type) { - case *ast.RangeStmt: - if isFieldSelector(t.X, "m", "Items") { - t.X = &ast.Ident{Name: "m"} - } - case *ast.AssignStmt: - if len(t.Lhs) == 1 && len(t.Rhs) == 1 { - switch lhs := t.Lhs[0].(type) { - case *ast.IndexExpr: - if isFieldSelector(lhs.X, "m", "Items") { - lhs.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - default: - if isFieldSelector(t.Lhs[0], "m", "Items") { - t.Lhs[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - switch rhs := t.Rhs[0].(type) { - case *ast.CallExpr: - if ident, ok := rhs.Fun.(*ast.Ident); ok && ident.Name == "append" { - ast.Walk(v, rhs) - if len(rhs.Args) > 0 { - switch arg := rhs.Args[0].(type) { - case *ast.Ident: - if arg.Name == "m" { - rhs.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - } - return nil - } - } - } - case *ast.IfStmt: - switch cond := t.Cond.(type) { - case *ast.BinaryExpr: - if cond.Op == token.EQL { - if isFieldSelector(cond.X, "m", "Items") && isIdent(cond.Y, "nil") { - cond.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - } - if t.Init != nil { - // Find form: - // if err := m[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - // return err - // } - switch s := t.Init.(type) { - case *ast.AssignStmt: - if call, ok := s.Rhs[0].(*ast.CallExpr); ok { - if sel, ok := call.Fun.(*ast.SelectorExpr); ok { - if x, ok := sel.X.(*ast.IndexExpr); ok { - // m[] -> (*m)[] - if sel2, ok := x.X.(*ast.SelectorExpr); ok { - if ident, ok := sel2.X.(*ast.Ident); ok && ident.Name == "m" { - x.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - // len(m.Items) -> len(*m) - if bin, ok := x.Index.(*ast.BinaryExpr); ok { - if call2, ok := bin.X.(*ast.CallExpr); ok && len(call2.Args) == 1 { - if isFieldSelector(call2.Args[0], "m", "Items") { - call2.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - } - } - } - } - } - } - case *ast.IndexExpr: - if isFieldSelector(t.X, "m", "Items") { - t.X = &ast.Ident{Name: "m"} - return nil - } - case *ast.CallExpr: - changed := false - for i := range t.Args { - if isFieldSelector(t.Args[i], "m", "Items") { - t.Args[i] = &ast.Ident{Name: "m"} - changed = true - } - } - if changed { - return nil - } - } - return v -} - -func isFieldSelector(n ast.Expr, name, field string) bool { - s, ok := n.(*ast.SelectorExpr) - if !ok || s.Sel == nil || (field != "" && s.Sel.Name != field) { - return false - } - return isIdent(s.X, name) -} - -func isIdent(n ast.Expr, value string) bool { - ident, ok := n.(*ast.Ident) - return ok && ident.Name == value -} - -func receiver(f *ast.FuncDecl) (ident *ast.Ident, pointer bool, ok bool) { - if f.Recv == nil || len(f.Recv.List) != 1 { - return nil, false, false - } - switch t := f.Recv.List[0].Type.(type) { - case *ast.StarExpr: - identity, ok := t.X.(*ast.Ident) - if !ok { - return nil, false, false - } - return identity, true, true - case *ast.Ident: - return t, false, true - } - return nil, false, false -} - -// dropExistingTypeDeclarations removes any type declaration for which extractFn returns true. The function -// returns true if the entire declaration should be dropped. -func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { - switch t := decl.(type) { - case *ast.GenDecl: - if t.Tok != token.TYPE { - return false - } - specs := []ast.Spec{} - for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.TypeSpec: - if extractFn(spec) { - continue - } - specs = append(specs, spec) - } - } - if len(specs) == 0 { - return true - } - t.Specs = specs - } - return false -} - -// dropEmptyImportDeclarations strips any generated but no-op imports from the generated code -// to prevent generation from being able to define side-effects. The function returns true -// if the entire declaration should be dropped. -func dropEmptyImportDeclarations(decl ast.Decl) bool { - switch t := decl.(type) { - case *ast.GenDecl: - if t.Tok != token.IMPORT { - return false - } - specs := []ast.Spec{} - for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.ImportSpec: - if spec.Name != nil && spec.Name.Name == "_" { - continue - } - specs = append(specs, spec) - } - } - if len(specs) == 0 { - return true - } - t.Specs = specs - } - return false -} - -func RewriteTypesWithProtobufStructTags(name string, structTags map[string]map[string]string) error { - return rewriteFile(name, []byte{}, func(fset *token.FileSet, file *ast.File) error { - allErrs := []error{} - - // set any new struct tags - for _, d := range file.Decls { - if errs := updateStructTags(d, structTags, []string{"protobuf"}); len(errs) > 0 { - allErrs = append(allErrs, errs...) - } - } - - if len(allErrs) > 0 { - var s string - for _, err := range allErrs { - s += err.Error() + "\n" - } - return errors.New(s) - } - return nil - }) -} - -func updateStructTags(decl ast.Decl, structTags map[string]map[string]string, toCopy []string) []error { - var errs []error - t, ok := decl.(*ast.GenDecl) - if !ok { - return nil - } - if t.Tok != token.TYPE { - return nil - } - - for _, s := range t.Specs { - spec, ok := s.(*ast.TypeSpec) - if !ok { - continue - } - typeName := spec.Name.Name - fieldTags, ok := structTags[typeName] - if !ok { - continue - } - st, ok := spec.Type.(*ast.StructType) - if !ok { - continue - } - - for i := range st.Fields.List { - f := st.Fields.List[i] - var name string - if len(f.Names) == 0 { - switch t := f.Type.(type) { - case *ast.Ident: - name = t.Name - case *ast.SelectorExpr: - name = t.Sel.Name - default: - errs = append(errs, fmt.Errorf("unable to get name for tag from struct %q, field %#v", spec.Name.Name, t)) - continue - } - } else { - name = f.Names[0].Name - } - value, ok := fieldTags[name] - if !ok { - continue - } - var tags customreflect.StructTags - if f.Tag != nil { - oldTags, err := customreflect.ParseStructTags(strings.Trim(f.Tag.Value, "`")) - if err != nil { - errs = append(errs, fmt.Errorf("unable to read struct tag from struct %q, field %q: %v", spec.Name.Name, name, err)) - continue - } - tags = oldTags - } - for _, name := range toCopy { - // don't overwrite existing tags - if tags.Has(name) { - continue - } - // append new tags - if v := reflect.StructTag(value).Get(name); len(v) > 0 { - tags = append(tags, customreflect.StructTag{Name: name, Value: v}) - } - } - if len(tags) == 0 { - continue - } - if f.Tag == nil { - f.Tag = &ast.BasicLit{} - } - f.Tag.Value = tags.String() - } - } - return errs -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go deleted file mode 100644 index 2dff5b9229..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/tags.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -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. -*/ - -package protobuf - -import ( - "github.com/golang/glog" - "k8s.io/gengo/types" -) - -// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if -// it exists, the value is boolean. If the tag did not exist, it returns -// false. -func extractBoolTagOrDie(key string, lines []string) bool { - val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines) - if err != nil { - glog.Fatal(err) - } - return val -} diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD.bazel b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD.bazel deleted file mode 100644 index 331f387423..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo", - importpath = "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/gogo/protobuf/gogoproto:go_default_library", - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/github.com/gogo/protobuf/vanity/command:go_default_library", - ], -) - -go_binary( - name = "protoc-gen-gogo", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go b/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go deleted file mode 100644 index 6e5051dce1..0000000000 --- a/vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/main.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -// Package main defines the protoc-gen-gogo binary we use to generate our proto go files, -// as well as takes dependencies on the correct gogo/protobuf packages for godeps. -package main - -import ( - "github.com/gogo/protobuf/vanity/command" - - // dependencies that are required for our packages - _ "github.com/gogo/protobuf/gogoproto" - _ "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/sortkeys" -) - -func main() { - command.Write(command.Generate(command.Read())) -} diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore b/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore deleted file mode 100644 index a5c47b66f8..0000000000 --- a/vendor/k8s.io/code-generator/cmd/import-boss/.gitignore +++ /dev/null @@ -1 +0,0 @@ -import-boss diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/BUILD.bazel b/vendor/k8s.io/code-generator/cmd/import-boss/BUILD.bazel deleted file mode 100644 index 0eddbb8b66..0000000000 --- a/vendor/k8s.io/code-generator/cmd/import-boss/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "vendor/k8s.io/code-generator/cmd/import-boss", - importpath = "k8s.io/code-generator/cmd/import-boss", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/import-boss/generators:go_default_library", - ], -) - -go_binary( - name = "import-boss", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/code-generator/cmd/import-boss/main.go b/vendor/k8s.io/code-generator/cmd/import-boss/main.go deleted file mode 100644 index d998994415..0000000000 --- a/vendor/k8s.io/code-generator/cmd/import-boss/main.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -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. -*/ - -// import-boss enforces import restrictions in a given repository. -// -// When a directory is verified, import-boss looks for a file called -// ".import-restrictions". If this file is not found, parent directories will be -// recursively searched. -// -// If an ".import-restrictions" file is found, then all imports of the package -// are checked against each "rule" in the file. A rule consists of three parts: -// * A SelectorRegexp, to select the import paths that the rule applies to. -// * A list of AllowedPrefixes -// * A list of ForbiddenPrefixes -// An import is allowed if it matches at least one allowed prefix and does not -// match any forbidden prefix. An example file looks like this: -// -// { -// "Rules": [ -// { -// "SelectorRegexp": "k8s[.]io", -// "AllowedPrefixes": [ -// "k8s.io/gengo/examples", -// "k8s.io/kubernetes/third_party" -// ], -// "ForbiddenPrefixes": [ -// "k8s.io/kubernetes/pkg/third_party/deprecated" -// ] -// }, -// { -// "SelectorRegexp": "^unsafe$", -// "AllowedPrefixes": [ -// ], -// "ForbiddenPrefixes": [ -// "" -// ] -// } -// ] -// } -// -// Note the second block explicitly matches the unsafe package, and forbids it -// ("" is a prefix of everything). -package main - -import ( - "os" - "path/filepath" - - "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/import-boss/generators" - - "github.com/golang/glog" -) - -func main() { - arguments := args.Default() - - // Override defaults. - arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) - arguments.InputDirs = []string{ - "k8s.io/kubernetes/pkg/...", - "k8s.io/kubernetes/cmd/...", - "k8s.io/kubernetes/plugin/...", - } - - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - glog.Errorf("Error: %v", err) - os.Exit(1) - } - glog.V(2).Info("Completed successfully.") -} diff --git a/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore b/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore deleted file mode 100644 index ffe6458c96..0000000000 --- a/vendor/k8s.io/code-generator/cmd/set-gen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -set-gen diff --git a/vendor/k8s.io/code-generator/cmd/set-gen/BUILD.bazel b/vendor/k8s.io/code-generator/cmd/set-gen/BUILD.bazel deleted file mode 100644 index 27ec240fe4..0000000000 --- a/vendor/k8s.io/code-generator/cmd/set-gen/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importmap = "vendor/k8s.io/code-generator/cmd/set-gen", - importpath = "k8s.io/code-generator/cmd/set-gen", - visibility = ["//visibility:private"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/set-gen/generators:go_default_library", - ], -) - -go_binary( - name = "set-gen", - embed = [":go_default_library"], - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/code-generator/cmd/set-gen/main.go b/vendor/k8s.io/code-generator/cmd/set-gen/main.go deleted file mode 100644 index cf8f01d89e..0000000000 --- a/vendor/k8s.io/code-generator/cmd/set-gen/main.go +++ /dev/null @@ -1,55 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -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. -*/ - -// set-gen is an example usage of gengo. -// -// Structs in the input directories with the below line in their comments will -// have sets generated for them. -// // +genset -// -// Any builtin type referenced anywhere in the input directories will have a -// set generated for it. -package main - -import ( - "os" - "path/filepath" - - "k8s.io/code-generator/pkg/util" - "k8s.io/gengo/args" - "k8s.io/gengo/examples/set-gen/generators" - - "github.com/golang/glog" -) - -func main() { - arguments := args.Default() - - // Override defaults. - arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) - arguments.InputDirs = []string{"k8s.io/kubernetes/pkg/util/sets/types"} - arguments.OutputPackagePath = "k8s.io/apimachinery/pkg/util/sets" - - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - glog.Errorf("Error: %v", err) - os.Exit(1) - } - glog.V(2).Info("Completed successfully.") -} diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/BUILD.bazel deleted file mode 100644 index ba56bd2f11..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "helpers.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/apis/componentconfig", - importpath = "k8s.io/kubernetes/pkg/apis/componentconfig", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD.bazel deleted file mode 100644 index 07d89dc51a..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install/BUILD.bazel +++ /dev/null @@ -1,17 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["install.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/apis/componentconfig/install", - importpath = "k8s.io/kubernetes/pkg/apis/componentconfig/install", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/api/legacyscheme:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/componentconfig:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/BUILD.bazel deleted file mode 100644 index 0797fb906e..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1/BUILD.bazel +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "defaults.go", - "doc.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1", - importpath = "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/componentconfig:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubelet/apis:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/master/ports:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/qos/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/qos/BUILD.bazel deleted file mode 100644 index 602ef4f443..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/qos/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["qos.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/qos", - importpath = "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD.bazel deleted file mode 100644 index 86c57789fc..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/BUILD.bazel +++ /dev/null @@ -1,53 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "daemon_controller.go", - "doc.go", - "update.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/daemon", - importpath = "k8s.io/kubernetes/pkg/controller/daemon", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/informers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/client-go/util/integer:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/api/v1/pod:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller/daemon/util:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/features:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubelet/types:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/algorithm:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/predicates:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/schedulercache:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/labels:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/metrics:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/BUILD.bazel deleted file mode 100644 index 5118f21acb..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/daemon/util/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["daemonset_util.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/daemon/util", - importpath = "k8s.io/kubernetes/pkg/controller/daemon/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/api/v1/pod:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/features:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubelet/apis:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubelet/types:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/algorithm:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/history/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/history/BUILD.bazel deleted file mode 100644 index 81a0e5b33b..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/history/BUILD.bazel +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["controller_history.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/history", - importpath = "k8s.io/kubernetes/pkg/controller/history", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", - "//vendor/k8s.io/client-go/informers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/retry:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/hash:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD.bazel deleted file mode 100644 index 3c6d0f98ec..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/statefulset/BUILD.bazel +++ /dev/null @@ -1,42 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "stateful_pod_control.go", - "stateful_set.go", - "stateful_set_control.go", - "stateful_set_status_updater.go", - "stateful_set_utils.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/statefulset", - importpath = "k8s.io/kubernetes/pkg/controller/statefulset", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/informers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/client-go/util/retry:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/api/v1/pod:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller/history:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/events/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/volume/events/BUILD.bazel deleted file mode 100644 index be8a6ec5f4..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/events/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["event.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/volume/events", - importpath = "k8s.io/kubernetes/pkg/controller/volume/events", - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD.bazel deleted file mode 100644 index 442efd002f..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/BUILD.bazel +++ /dev/null @@ -1,57 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "index.go", - "pv_controller.go", - "pv_controller_base.go", - "scheduler_assume_cache.go", - "scheduler_binder.go", - "scheduler_binder_cache.go", - "scheduler_binder_fake.go", - "volume_host.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume", - importpath = "k8s.io/kubernetes/pkg/controller/volume/persistentvolume", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/informers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - "//vendor/k8s.io/client-go/tools/reference:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/cloudprovider:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller/volume/events:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/features:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/goroutinemap:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/io:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/mount:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/volume:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/volume/util:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/volume/util/recyclerclient:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics/BUILD.bazel deleted file mode 100644 index 7c74a8a489..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["metrics.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics", - importpath = "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/metrics", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/categories/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/categories/BUILD.bazel deleted file mode 100644 index 11344f8d39..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/categories/BUILD.bazel +++ /dev/null @@ -1,13 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["categories.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/categories", - importpath = "k8s.io/kubernetes/pkg/kubectl/categories", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/resource/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/resource/BUILD.bazel deleted file mode 100644 index 643a089db0..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/resource/BUILD.bazel +++ /dev/null @@ -1,33 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["get.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/cmd/resource", - importpath = "k8s.io/kubernetes/pkg/kubectl/cmd/resource", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/templates:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/openapi:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/resource:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/util/i18n:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/printers:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/interrupt:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/env/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/env/BUILD.bazel deleted file mode 100644 index 34d8c89e53..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/env/BUILD.bazel +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "env_parse.go", - "env_resolve.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/cmd/util/env", - importpath = "k8s.io/kubernetes/pkg/kubectl/cmd/util/env", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/api/v1/resource:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/fieldpath:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/plugins/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/plugins/BUILD.bazel deleted file mode 100644 index e71d6f518b..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/plugins/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "env.go", - "loader.go", - "plugins.go", - "runner.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/plugins", - importpath = "k8s.io/kubernetes/pkg/kubectl/plugins", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD.bazel deleted file mode 100644 index 0925fbb288..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/resource/BUILD.bazel +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "builder.go", - "doc.go", - "helper.go", - "interfaces.go", - "mapper.go", - "result.go", - "selector.go", - "visitor.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/resource", - importpath = "k8s.io/kubernetes/pkg/kubectl/resource", - visibility = ["//visibility:public"], - deps = [ - "//vendor/golang.org/x/text/encoding/unicode:go_default_library", - "//vendor/golang.org/x/text/transform:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/categories:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubectl/validation:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/util/crlf/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/util/crlf/BUILD.bazel deleted file mode 100644 index 88489cfb54..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/util/crlf/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["crlf.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/util/crlf", - importpath = "k8s.io/kubernetes/pkg/kubectl/util/crlf", - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/kubectl/util/transport/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/kubectl/util/transport/BUILD.bazel deleted file mode 100644 index 8623abf7f4..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/kubectl/util/transport/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["round_tripper.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/kubectl/util/transport", - importpath = "k8s.io/kubernetes/pkg/kubectl/util/transport", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gregjones/httpcache:go_default_library", - "//vendor/github.com/gregjones/httpcache/diskcache:go_default_library", - "//vendor/github.com/peterbourgon/diskv:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/predicates/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/predicates/BUILD.bazel deleted file mode 100644 index e4fb7ffc3f..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/predicates/BUILD.bazel +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "error.go", - "metadata.go", - "predicates.go", - "testing_helper.go", - "utils.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/predicates", - importpath = "k8s.io/kubernetes/pkg/scheduler/algorithm/predicates", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/listers/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper/qos:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/features:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/kubelet/apis:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/algorithm:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/priorities/util:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/schedulercache:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/util:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/volumebinder:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/volume/util:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/schedulercache/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/scheduler/schedulercache/BUILD.bazel deleted file mode 100644 index 357dbfec9c..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/schedulercache/BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cache.go", - "interface.go", - "node_info.go", - "util.go", - ], - importmap = "vendor/k8s.io/kubernetes/pkg/scheduler/schedulercache", - importpath = "k8s.io/kubernetes/pkg/scheduler/schedulercache", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/apis/core/v1/helper:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/priorities/util:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/scheduler/util:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/scheduler/volumebinder/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/scheduler/volumebinder/BUILD.bazel deleted file mode 100644 index 271e2c06b6..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/scheduler/volumebinder/BUILD.bazel +++ /dev/null @@ -1,18 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["volume_binder.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/scheduler/volumebinder", - importpath = "k8s.io/kubernetes/pkg/scheduler/volumebinder", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/informers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/controller/volume/persistentvolume:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD.bazel deleted file mode 100644 index f1aebf4a85..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["goroutinemap.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/util/goroutinemap", - importpath = "k8s.io/kubernetes/pkg/util/goroutinemap", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff/BUILD.bazel deleted file mode 100644 index 7e26a2dc08..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["exponential_backoff.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff", - importpath = "k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff", - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel deleted file mode 100644 index e963fcf878..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/metrics/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["util.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/util/metrics", - importpath = "k8s.io/kubernetes/pkg/util/metrics", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) diff --git a/vendor/k8s.io/kubernetes/pkg/util/pointer/BUILD.bazel b/vendor/k8s.io/kubernetes/pkg/util/pointer/BUILD.bazel deleted file mode 100644 index 07a4f79885..0000000000 --- a/vendor/k8s.io/kubernetes/pkg/util/pointer/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["pointer.go"], - importmap = "vendor/k8s.io/kubernetes/pkg/util/pointer", - importpath = "k8s.io/kubernetes/pkg/util/pointer", - visibility = ["//visibility:public"], -) diff --git a/vendor/k8s.io/kubernetes/third_party/htpasswd/COPYING b/vendor/k8s.io/kubernetes/third_party/htpasswd/COPYING deleted file mode 100644 index c6b097c016..0000000000 --- a/vendor/k8s.io/kubernetes/third_party/htpasswd/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (C) 2003-2013 Edgewall Software -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. 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. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. diff --git a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/BUILD.bazel b/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/BUILD.bazel deleted file mode 100644 index d7712f43c5..0000000000 --- a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "clientset.go", - "doc.go", - ], - importmap = "vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset", - importpath = "k8s.io/metrics/pkg/client/clientset_generated/clientset", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - "//vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1:go_default_library", - "//vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1beta1:go_default_library", - ], -) diff --git a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel b/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel deleted file mode 100644 index 81753e6be2..0000000000 --- a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme/BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importmap = "vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme", - importpath = "k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/metrics/pkg/apis/metrics/v1alpha1:go_default_library", - "//vendor/k8s.io/metrics/pkg/apis/metrics/v1beta1:go_default_library", - ], -) diff --git a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1/BUILD.bazel b/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1/BUILD.bazel deleted file mode 100644 index 30dbd02ffa..0000000000 --- a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "metrics_client.go", - "nodemetrics.go", - "podmetrics.go", - ], - importmap = "vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1", - importpath = "k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/metrics/pkg/apis/metrics/v1alpha1:go_default_library", - "//vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme:go_default_library", - ], -) diff --git a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1beta1/BUILD.bazel b/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1beta1/BUILD.bazel deleted file mode 100644 index 9c22882333..0000000000 --- a/vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1beta1/BUILD.bazel +++ /dev/null @@ -1,23 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "metrics_client.go", - "nodemetrics.go", - "podmetrics.go", - ], - importmap = "vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1beta1", - importpath = "k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/metrics/pkg/apis/metrics/v1beta1:go_default_library", - "//vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/scheme:go_default_library", - ], -)